public static Map getMap4Json(String jsonString){
JSONObject jsonObject = new JSONObject( jsonString );
Iterator keyIter = jsonObject.keys();
String key;
Object value;
Map valueMap = new HashMap();
while( keyIter.hasNext())
{
key = (String)keyIter.next();
value = jsonObject.get(key);
valueMap.put(key, value);
}
return valueMap;
}
转载于:https://my.oschina.net/lhjtianji/blog/118885