/**
* java
解析JSON字符串
* 需要引入jar包
* net.sf.json-lib
* net.sf.ezmorph
* 返回map
*/
public static Map jsonToMap(String jsonStr){
JSONObject object=null;
try {
object=JSONObject.fromObject(jsonStr);
} catch (Exception e) {
e.printStackTrace();
}
Iterator iter = object.keySet().iterator();
Map map = new HashMap();
while (iter.
hasNext()) {
String key = (String) iter.next();
String value = object.getString(key);
map.put(key, value);
}
return map;
}