fastjson对象转为json字符串日期格式变为时间戳问题
转换后的value变成了时间戳,显示出来很不友好。
fastjson的API中有个方法可以将对象中的时间格式不转化为时间戳的方法:
JSON.toJSONStringWithDateFormat(Object,dateformat,SerializerFeature.WriteDateUseDateFormat)
例如
JSON.toJSONStringWithDateFormat(map, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat);