Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastjosn date类型反序列化报错 #381

Closed
rw12306 opened this issue May 30, 2022 · 3 comments
Closed

fastjosn date类型反序列化报错 #381

rw12306 opened this issue May 30, 2022 · 3 comments
Labels
bug Something isn't working question Further information is requested
Milestone

Comments

@rw12306
Copy link

rw12306 commented May 30, 2022

使用版本:fastjson2-2.0.4.jar

https://user-images.githubusercontent.com/42023195/170903416-ea183b33-5760-41ef-94b1-69d238c4a08e.png

这个日期是Date类型,直接给我序列化为Long了,结果再反序列化的时候就报错了

https://user-images.githubusercontent.com/42023195/170903509-b8d9549c-7b3d-4eea-9539-d47d946a6fe1.png

使用Byte类型也是,反序列化出来成Integer 了,反序列化回来Byte 的字段变成了Integer , 也是直接报Integer 不能强制转换为Byte

@rw12306 rw12306 added the question Further information is requested label May 30, 2022
@wenshao
Copy link
Member

wenshao commented May 30, 2022

你能提供下你怎么序列化的代码么?

@wenshao
Copy link
Member

wenshao commented Jun 8, 2022

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.7-SNAPSHOT/
问题已经修复,请用2.0.7-SNAPSHOT版本验证

@wenshao wenshao added the bug Something isn't working label Jun 8, 2022
@wenshao wenshao added this to the 2.0.7 milestone Jun 8, 2022
@wenshao
Copy link
Member

wenshao commented Jun 11, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.7
问题已经修复,请用新版本

@wenshao wenshao closed this as completed Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants