You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
serializer.config(SerializerFeature.WriteDateUseDateFormat, true);
为什么要强制设置这个?如果我features设置了false都不会起作用,我正常的使用JSON.toJSONString(object)输出的Date类型的字段是long类型的数字,而用了下面这2个方法,Date类型都转换成了这种格式"2016-01-02 17:46:41",我看源码,发现了这个强制性的设置
方法1:
public static String toJSONString(Object object, SerializeFilter[] filters, SerializerFeature... features) {
SerializeWriter out = new SerializeWriter();
方法2:
public static String toJSONString(Object object, SerializeFilter filter, SerializerFeature... features) {
SerializeWriter out = new SerializeWriter();
The text was updated successfully, but these errors were encountered: