fastjson 1.2.47 version parse string "9999-12-31" error

oxiaedzo  于 2021-11-27  发布在  Java
关注(0)|答案(2)|浏览(461)

well , when I pasre string "9999-12-31" to Date ,fastjson take me a error:

com.alibaba.fastjson.JSONException: For input string: "9999-12-31"
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:665)

What should I do ? I user annotation so I don't want to use JSON.DEFFAULT_DATE_FORMAT = "yyyy-MM-dd";

xlpyo6sf

xlpyo6sf1#

haha , use @JSONField(format = "yyyy-MM-dd") can make it work

pkwftd7m

pkwftd7m2#

最新版本1.2.59,已经解决

相关问题