日期:2014-05-16 浏览次数:20318 次
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; }