-
Notifications
You must be signed in to change notification settings - Fork 479
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]JSONWriter.Feature.FieldBased导致@JSONField注解失效 #445
Comments
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.7-SNAPSHOT/ |
wenshao
added a commit
that referenced
this issue
Jun 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
引用版本:fastjson2-2.0.7-20220608.134803-35
配置信息:
返回实体字段:
@JSONField(format = "yyyy-MM-dd HH")
private Date history;
@JSONField(format = "yyyy-MM-dd")
private LocalDate yesterday;
@JSONField(format = "yyyy-MM-dd HH:mm")
private java.sql.Date tomorrow;
期望:{"current":"2022-06-09 00:11:10","history":"2022-06-09 00","tomorrow":"2022-06-09 00:11","yesterday":"2022-06-09"}
实际 :{"current":"2022-06-09 00:19:35","history":"2022-06-09 00:19:35","tomorrow":"2022-06-09 00:19:35","yesterday":"2022-06-09 00:00:00"}
疑问:文档中对FieldBased的描述是,”FieldBased | 基于字段反序列化,如果不配置,会默认基于public的field和getter方法序列化。配置后,会基于非static的field(包括private)做反序列化“。
详情见:https://github.com/youandeanyou/springboot-demo
访问:http://localhost:8081/test 即可。
The text was updated successfully, but these errors were encountered: