java JSONObject转为map


不向下解析

//json对象转为map
public static Map JsonToMap(JSONObject j){
	Map map = new HashMap<>();
	Iterator iterator = j.keys();
	while(iterator.hasNext())
	{
		String key = (String)iterator.next();
		Object value = j.get(key);
		map.put(key, value);
	}
	return map;
}