67,513
社区成员
发帖
与我相关
我的任务
分享
Map map = new HashMap();
map.put("name", "json");
map.put("bool", Boolean.TRUE);
map.put("int", new Integer(1));
map.put("arr", new String[] { "a", "b" });
JSONObject json = JSONObject.fromObject(map);
System.out.println(json);
Map map = new HashMap();
map.put("name", "json");
map.put("arr", new String[] { "a", "b" });
map.put("int", new Integer(1));
map.put("bool", Boolean.TRUE);
JSONObject json = JSONObject.fromObject(map);
System.out.println(json);