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 @ 2021-05-10 18:13  凌波漫步~  阅读(7168)  评论(0编辑  收藏  举报