What is the best way to convert a JSON code as this:
{ \"data\" : { \"field1\" : \"value1\", \"field2\" : \"value2\" } }
If you're using org.json, JSONObject has a method toMap(). You can easily do:
toMap()
Map myMap = myJsonObject.toMap();