JSONObject.toJSONString(map)

Map<Integer, List<Integer>> map = new LinkedHashMap<>();
map.put(1,ddzCard.getOneSendCardList());
String json = JSONObject.toJSONString(map);
System.out.println("json:"+json);
原文地址:https://www.cnblogs.com/michaelcnblogs/p/11529173.html