[FEATURE] 为JSON.toJSON()添加format入参
Open
enhancement
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
`JSON.toJSONString(obj, "millis") `可通过format入参控制Date类型输出为long类型。
但是`JSON.toJSON()`并没有这样的入参,期望也添加类似的入参能力
fastjson2版本:2.0.39
Contributor guide
Research direction
Start by locating the implementations and existing tests for JSON.toJSON() and JSON.toJSONString(obj, "millis"). Trace how the format argument affects Date serialization, then add the corresponding JSON.toJSON() capability and tests showing the expected long output for the requested format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100