sinamdar2015 / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

GSON dies with an IllegalStateException with valid json #417

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

// Here is the string gson dies on:
String json = "{\"coordinates\": {\"type\": \"Point\", \"coordinates\": 
[1.41751613, 52.13286294]}"

// I create my builder as so:
Gson gson = new GsonBuilder().
            serializeNulls().
            create();
// I then use this builder to put this json in a map:
Map<String,Object> a = gson.fromJson(json, Map.class);
System.out.println(a);

A type-A "freakout" ensues. Thoughts?
My gson version is 2.1 (using maven to grab that jar)
My favourite colour is sometimes green, other times it is blue. 
- Sina

Original issue reported on code.google.com by sin...@gmail.com on 2 Mar 2012 at 5:13

GoogleCodeExporter commented 9 years ago
Sorry, i saw an error in my test case, and… yes this is more likely my 
fault…

Original comment by sin...@gmail.com on 2 Mar 2012 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 18 Mar 2012 at 5:23