alibaba / alibaba/fastjson2

[FEATURE] 请求添加unicode取消自动解码

Open
#2,391 7 comments 0 reactions 0 assignees View on GitHub
bug enhancement wontfix
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

理由1:https://github.com/alibaba/fastjson2/issues/2196
理由2:某些用户并不想获取被解码后的数据,反而青睐于未被处理过的数据,也就是只想输入什么数据解析后数据不变
![image](https://github.com/alibaba/fastjson2/assets/63632785/ea423ee7-74b7-4a45-abae-bbfc19d7312d)
如上图,希望输出为:`{"vip": "7\u5929VIP\u4F53\u9A8C\u5361"}`
从这个角度出发,可提供选项,使人可以根据需要自由选择,您不认可的话,不作为默认配置提供即可,只是给出可选配置项,会使项目更加完善,因为从目前来说,我并非固执己见,理由1的链接中有朋友有相同看法,未来或许有更多看法相同,或者相同需求的人。

我并非程序员,无法在应用场景说服您,也不明白所谓json标准,我只是想传入什么,经过解析后我就能获得什么,诚然这是一个朴实的想法,但我想并非毫无用处,如果并不麻烦,为何不添加这个功能试试呢?

Contributor guide

Open the contributing guide

Research direction

Read the requested behavior and the related discussion in issue #2196 first. Identify the existing JSON parsing and serialization entry points involved in Unicode escaping, then define an opt-in setting whose completed behavior preserves Unicode escape sequences without changing the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.