I'm using Jackson
to serialize and deserialize JSON
objects to and from POJO
-s.
One of the elements I'm trying to create is a list of arrays (I think that's what this would be called).
"Images": [
{}
],
I've tried:
public ArrayList<String> Images = new ArrayList<String>();
and then just didn't add anything to it then called the object mapper.
That unfortunately gave me just a list:
"Images":[
]
I then tried to make it an list of string arrays:
public ArrayList<String[]> Images = new ArrayList<String[]>();
I added an empty array to my ArrayList:
String[] tempArray = {};
Images.add(tempArray);
But that gave me:
"Images":[
[]
],
How can I get the needed format?