[FEATURE] 流式解析API如何解析Boolean?
Open
enhancement
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
不知道是不是已知的?`JSONReader` 的 API 显得比较混乱。
我主要的问题是:告诉我怎么把 `Boolean` 解析出来?
> nextIfTrue/Flase 没有这个方法? 或者 isBoolean 去哪儿了? 目前的解决方案只能是用字符判断,这是不是有点太low了?
另外还想吐槽一下 Fastjson2 的API,拿 JSONReader 来讲,不光是完备性问题。API互相之间缺乏层次依赖,好像是不同的人实现的。看看那一堆重复的
> switch (ch) ... case '0' ... case 't' ...
Contributor guide
Research direction
Read JSONReader and search for the boolean-related entry points named in the issue, including nextIfTrue/Flase and isBoolean, then inspect how the existing streaming parsing paths handle boolean characters. Define the intended public API and verify that callers can parse Boolean values without manually inspecting characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100