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

[BUG]JSONB反序列化LocalDate报错:name not support input : LOCAL_DATE -87 #2907

Closed
237chenhao opened this issue Aug 30, 2024 · 1 comment
Labels
bug Something isn't working fixed
Milestone

Comments

@237chenhao
Copy link

问题描述

使用JSONB进行对象拷贝操作,例如:JSONB.parseObject(JSONB.toBytes(对象A), 目标类B.class)
如果类A中有LocalDate属性,类B没有,并且对象A的LocalDate属性不为null,那么上面的语句将会报错:
image

环境信息

请填写以下信息:

  • OS信息: Mac
  • JDK信息: jdk17
  • 版本信息:Fastjson2 2.0.52

重现步骤

1、类A
image
2、类B
image
3、代码
image
4、报错
image

期待的正确结果

正常反序列化,或者忽略目标类不存在的属性,设置了好像没用。

相关日志输出

请复制并粘贴任何相关的日志输出。

附加信息

如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。

@237chenhao 237chenhao added the bug Something isn't working label Aug 30, 2024
@wenshao wenshao added this to the 2.0.53 milestone Sep 1, 2024
@wenshao wenshao added the fixed label Sep 1, 2024
@wenshao
Copy link
Member

wenshao commented Sep 16, 2024

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

@wenshao wenshao closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants