对象转JSONObject时,值为null的属性会消失
直接上代码。
String updateDate = JSONObject.toJSONString(object, SerializerFeatrue.WriteMapNullValue, SerializerFeatrue.WriteNullStringAsEmpty);
问题解决。
直接上代码。
String updateDate = JSONObject.toJSONString(object, SerializerFeatrue.WriteMapNullValue, SerializerFeatrue.WriteNullStringAsEmpty);
问题解决。