how can I parse an object that looks like this with GSON:
{ response:
{ value1: 0,
value2: "string",
bigjsonObject: {
value1b: 0,
bigJSONArray: [...]
}
}
All of the examples in GSON have less mixed value types, and the docs mention something about how this can screw up GSON deserialization but don't elaborate and still suggest that GSON can map this to an object.
My current test using gson.fromJSON(inputstream, myObject.class) returns an object with null values, so it is not mapping them.
myObject.class contains an ArrayList of type bigJSONArray
public class myObject {
private ArrayList<bigObjectModel> bigJSONArray;
myObject(){};
}
my assumption is that my ArrayList object doesn't have the types it is looking for, or something. But I am misunderstanding how mapping should work in this case.
gson.fromJSON(inputstream, myObject.class), do you want to see what myObject.class looks like?