Continuing from this question.
I\'m having trouble deserializing the following json array (Sorry for the size):
\"geometry\": { \"type\": \"Polygon\"
I think I know where your problem comes from, reading the Gson API :
If the object that your are serializing/deserializing is a ParameterizedType (i.e. contains at least one type parameter and may be an array) then you must use the toJson(Object, Type) or fromJson(String, Type) method. Here is an example for serializing and deserialing a ParameterizedType:
Type listType = new TypeToken() {}.getType();
List target = new LinkedList();
target.add("blah");
Gson gson = new Gson();
String json = gson.toJson(target, listType);
List target2 = gson.fromJson(json, listType);
Knowing that
Type typeOfCollectionOfFoo = new TypeToken>(){}.getType()
Hope this helps.