What Jackson POJO structure will be required based on this piece of json ?
Something like ? :
class POJO {
private List<ToAddList> toAdd;
private List<ToRemoveList> toRemove
}
class ToAddList(){
String name;
int pos;
}
class ToRemoveList(){
String name
}
///////////////////////JSON///////////////////////////
{
"toAdd": [
{
"name": "test",
"pos": 0,
},
{
"name": "test",
"pos": 1,
},
],
"toRemove": [
{
"name": "test"
},
{
"name": "test"
}
]
}
You have a simple bean with two fields, a String and a Number. This bean is used in lists, which are contained in another bean:
Thats it.