JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd", SerializerFeature.WriteMapNullValue)

it2022-05-05  112

在服务端输出json数据时按照一定的格式输出时间字段,fastjson支持两种方式:

1.使用JSON.toJSONStringWithDateFormat方法

2.JSON.toJSONString方法增加SerializerFeature.WriteDateUseDateFormat参数


最新回复(0)