代码块
获取所有Map(json)中的键值对,例如:
JSONObject json1=JSONObject.fromObject("{'username' : '11111','clientid' : '','password' : '222222'}");
Map<String, Object> map =json1;
for (Entry<String, Object> entry : map.entrySet()) {
//getKey获取Entry集合中的key、getValue获取value
System.out.println(entry.getKey()+"="+entry.getValue());
}