[QUESTION] 序列化问题可以不兼容 @JsonFormat 吗
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 请描述您的问题
*询问有关本项目的使用和其他方面的相关问题。*
```
@Data
public class UserVO {
@JsonFormat(pattern = "dd/MM/yyyy")
private Date date;
}
@Data
public class User {
private Date date;
}
```
JSON.parseObject(JSON.toJSONString(UserVO ), User.class);
反序列化使用 JSONReader.Feature.SupportSmartMatch 来不兼容 @JsonFormat
序列化可以支持不兼容 @JsonFormat吗
Contributor guide
Research direction
Start with the UserVO and User examples in the issue and reproduce the JSON.toJSONString/User conversion using the stated @JsonFormat pattern and JSONReader.Feature.SupportSmartMatch setting. Determine whether serialization can ignore @JsonFormat, then document the supported behavior or the required change; no source file or test is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100