I receive a json list of objects. Let's call it list of some class MyClass.class
. So I can easy deserialize it to List<MyClass>
. But I want to add a wrapper class, for example:
class MyWrapper {
private List<MyClass> items;
//Getter & Setter
}
And I want to deserialize the following json:
[
{
...
},
{
...
}
]
to MyWrapper.class
. How can I do it using jackson annotations ?