SortedMap<String, VehicleData> hmap = new TreeMap<String, VehicleData>();
My JSON String sample:
{
"3": {
"Field1": 12,
"Field2": "value",
"Field3": null
},
"test": {
"Field1": 20,
"Field2": "value",
"Field3": "vit"
}
}
I want to convert this string to HashMap declared above. Is there any method to convert directly from Json string to Hashmap?
using Gson you can parse it eailsy at server side.
If you want client/server side serialize/deserialize JSON in GWT code.
In GWT 2.1.1 you can use GWT AutoBean framework
I've not tried with complex and low level with Map, you can go with doc
Finally if you want to gson on client side with GWT then you have to try
bGwtGson library