直接上代码:
JSONObject jsonObject
= new JSONObject();
jsonObject
.add("name",null
);
String str
= jsonObject
.toString();
str
= JSONObject
.toJSONString(jsonObject
, SerializerFeature
.WriteMapNullValue
);
转载请注明原文地址:https://ipadbbs.8miu.com/read-56252.html