JAVA之Map转JSONObject

private JSONObject toJsonObj(Map<String, Object> map, JSONObject resultJson) {
Iterator it = map.keySet().iterator();
while (it.hasNext()) {
String key = (String) it.next();
resultJson.put(key, map.get(key));
}
return resultJson;
}
posted @ 2017-04-24 11:03  黄小易  阅读(15214)  评论(0编辑  收藏  举报