对象转JSONObject时,值为null的属性会消失

直接上代码。
String updateDate = JSONObject.toJSONString(object, SerializerFeatrue.WriteMapNullValue, SerializerFeatrue.WriteNullStringAsEmpty);
问题解决。

posted @ 2021-02-23 11:22  云雀恭弥  阅读(952)  评论(0)    收藏  举报