[QUESTION]在序列化的时候如何把 LocalDateTime 类型的null 输出为 空的字符串双引号?
Open
question
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
LocalDateTime time=null;
序列化结果为:
{"time":null}
理想结果为:
{"time":""}
怎么能达到目的?
Contributor guide
Research direction
The issue provides only a Java snippet and expected JSON output; no repository file, test, or entry point is named. Start by reproducing the LocalDateTime null serialization example and review fastjson2's Java serialization options. Done means identifying or documenting a supported way to serialize this null value as an empty string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100