How can I parse this JSON using GSON?
{
"1" : [
{
"id" : 1,
"images" : [
{},
{},
...
]
},
{},
...
],
"2" : [
{},
{},
...
],
...
}
I ran out of ideas how to parse it. I was trying to use map but objects were null.
My classes:
public class Root {
private HashMap<Integer, FirstObject> objects;
}
public class FirstObject {
private List<SecondObject> objects;
}
public class SecondObject {
private int id;
private List<Image> images;
}
public class Image {
...
}
What I'm doing wrong?