java获去json所有对象

public static void main(String args[]){
JSONObject json1=JSONObject.fromObject("{'username' : '11111','clientid' : '','password' : '222222'}");
Map<String, Object> map =json1;
for (Entry<String, Object> entry : map.entrySet()) {
System.out.println(entry.getKey()+"="+entry.getValue());
}
}

posted @ 2017-08-02 17:18  hanggle  阅读(281)  评论(0编辑  收藏  举报