【Java】+JSON数据格式化输出

https://www.cnblogs.com/shoufeng/p/11196500.html

JSONObject object = JSONObject.parseObject(jsonString);

String pretty = JSON.toJSONString(object, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteDateUseDateFormat);

 

posted @ 2020-05-04 23:00  淡怀  阅读(1778)  评论(0编辑  收藏  举报