Код: Выделить всё
public class Foo {
private Bar[] bars;
@JsonCreator
public Foo(Bar[] bars) {
this.bars = bar;
}
}
< /code>
Я бы хотел, чтобы сериализованный JSON выглядел так: < /p>
[
{
"x": 1,
"b": "b1"
},
{
"x": 2,
"b": "b2"
}
]
Подробнее здесь: https://stackoverflow.com/questions/589 ... rray-field