【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);

原文地址:https://www.cnblogs.com/danhuai/p/12828733.html