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
日期格式:2022-02-16T16:00:00.000Z 序列化报错 illegal date input
环境信息
请填写以下信息:
OS信息: [e.g.:MacOs 13.2]
JDK信息: [e.g.:jdk 1.8.0_212]
版本信息:[e.g.:Fastjson2 2.0.24]
重现步骤
字段 private Date activeDate;
json {"activeDate": "2022-02-16T16:00:00.000Z"}
Exception in thread "main" com.alibaba.fastjson2.JSONException: illegal date input, offset 16, character ", line 1, column 17, fastjson-version 2.0.24 {"activeDate": "2022-02-16T16:00:00.000Z"}
at com.alibaba.fastjson2.JSONReaderUTF16.readMillis19(JSONReaderUTF16.java:6801)
at com.alibaba.fastjson2.reader.ObjectReaderImplDate.readDate(ObjectReaderImplDate.java:99)
at com.alibaba.fastjson2.reader.ObjectReaderImplDate.readObject(ObjectReaderImplDate.java:70)
期待的正确结果
正确序列化
The text was updated successfully, but these errors were encountered:
问题描述
日期格式:2022-02-16T16:00:00.000Z 序列化报错 illegal date input
环境信息
请填写以下信息:
重现步骤
字段 private Date activeDate;
json {"activeDate": "2022-02-16T16:00:00.000Z"}
Exception in thread "main" com.alibaba.fastjson2.JSONException: illegal date input, offset 16, character ", line 1, column 17, fastjson-version 2.0.24 {"activeDate": "2022-02-16T16:00:00.000Z"}
at com.alibaba.fastjson2.JSONReaderUTF16.readMillis19(JSONReaderUTF16.java:6801)
at com.alibaba.fastjson2.reader.ObjectReaderImplDate.readDate(ObjectReaderImplDate.java:99)
at com.alibaba.fastjson2.reader.ObjectReaderImplDate.readObject(ObjectReaderImplDate.java:70)
期待的正确结果
正确序列化
The text was updated successfully, but these errors were encountered: