List<String> list = new ArrayList<>(); list.add("{'county':'china','age':18}"); list.add("{'county':'japan','age':28}"); String data = JSON.toJSONString(list,SerializerFeature.WriteNullListAsEmpty); System.out.println(data);
结果:
标签:格式化,list,add,county,json,java,data From: https://www.cnblogs.com/chenchengzi/p/17651713.html