Convert JSONObject to Map

You can use Gson() (com.google.gson) library if you find any difficulty using Jackson.

//changed yourJsonObject.toString() to yourJsonObject as suggested by Martin Meeser

HashMap<String, Object> yourHashMap = new Gson().fromJson(yourJsonObject, HashMap.class);

Leave a Comment