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
Exception in thread "main" com.alibaba.fastjson.JSONException: parseLong error, value : -01-09 15:38:13
at com.alibaba.fastjson.JSON.parseObject(JSON.java:517)
at com.fintek.mx.market.user.DemoApplication.main(DemoApplication.java:12)
Caused by: com.alibaba.fastjson2.JSONException: parseLong error, value : -01-09 15:38:13
at com.alibaba.fastjson2.JSONReader.toInt64(JSONReader.java:2504)
at com.alibaba.fastjson2.JSONReader.getInt64(JSONReader.java:650)
at com.alibaba.fastjson2.JSONReaderUTF16.readInt64(JSONReaderUTF16.java:2835)
at com.alibaba.fastjson2.reader.ORG_1_1_BizDTO.readObject(Unknown Source)
at com.alibaba.fastjson.JSON.parseObject(JSON.java:507)
... 1 more
The text was updated successfully, but these errors were encountered:
问题描述
fastjson2 将日期格式的String(yyyy-MM-dd HH:mm:ss)反序列化成Long类型出错(但是fastjson1可以)
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
运行下述代码即可
期待的正确结果
createTime=1673249893000
相关日志输出
Exception in thread "main" com.alibaba.fastjson.JSONException: parseLong error, value : -01-09 15:38:13
at com.alibaba.fastjson.JSON.parseObject(JSON.java:517)
at com.fintek.mx.market.user.DemoApplication.main(DemoApplication.java:12)
Caused by: com.alibaba.fastjson2.JSONException: parseLong error, value : -01-09 15:38:13
at com.alibaba.fastjson2.JSONReader.toInt64(JSONReader.java:2504)
at com.alibaba.fastjson2.JSONReader.getInt64(JSONReader.java:650)
at com.alibaba.fastjson2.JSONReaderUTF16.readInt64(JSONReaderUTF16.java:2835)
at com.alibaba.fastjson2.reader.ORG_1_1_BizDTO.readObject(Unknown Source)
at com.alibaba.fastjson.JSON.parseObject(JSON.java:507)
... 1 more
The text was updated successfully, but these errors were encountered: