Created
April 19, 2016 03:14
-
-
Save kitelife/b3c783ee323d2e152beda054c6c41cc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private HashMap<String, Object> jsonToMap(String t) throws JSONException { | |
HashMap<String, Object> map = new HashMap<String, Object>(); | |
JSONObject jObj = new JSONObject(t); | |
Iterator<?> keys = jObj.keys(); | |
while (keys.hasNext()) { | |
String key = (String) keys.next(); | |
map.put(key, jObj.get(key)); | |
} | |
return map; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment