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]JSONObject.toJavaObject()方法,时间转换问题 #504

Closed
914313670 opened this issue Jun 24, 2022 · 1 comment
Closed

[BUG]JSONObject.toJavaObject()方法,时间转换问题 #504

914313670 opened this issue Jun 24, 2022 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@914313670
Copy link

914313670 commented Jun 24, 2022

问题描述

1.2.83版本升级至2.0.7后
实体属性加上
@JSONField(format = "yyyy-MM-dd HH:mm:ss")注解后
调用JSONObject.toJavaObject()方法,json时间字段为空字符串时候会出现报错

环境信息

  • OS信息: Windows 10
  • JDK信息: Openjdk 1.8.0_312
  • 版本信息:Fastjson 2.0.7

重现步骤

实体
image
1.2.83版本
image
2.0.7版本
image

期待的正确结果

toJavaObject方法后和1.2.83版本一致

@914313670 914313670 added the bug Something isn't working label Jun 24, 2022
@wenshao wenshao added this to the 2.0.8 milestone Jun 24, 2022
wenshao added a commit that referenced this issue Jun 25, 2022
@wenshao
Copy link
Member

wenshao commented Jun 25, 2022

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

@wenshao wenshao closed this as completed Jun 25, 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
Projects
None yet
Development

No branches or pull requests

2 participants