Proposal: more abstracted SAX handler for lots of JSON manipulates
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- backend-api-design
Research direction
Start by reading the existing sonic-cpp SAX handler and lazysax behavior described in the issue, focusing on how parsing scope and JSON types are currently handled. Clarify the handler API and expected behavior for user-defined loading, skipping, and manipulation before identifying tests for those cases; done means the proposed operations work without requiring whole-document parsing.
Written by the indexing model from the issue text.
Description
SAX handler is necessary because it consumes less memory and has fast performance. especially based on SIMD skip. Now, sonic-cpp's handler is designed to parse the whole json, and lazysax is limited to only parsing the top level of json. There are many limits:
- not support load or skip according to the user-defined handler.
- can not check json type in sax.
We can add SkipOne(raw json), CheckOne(type) and other handler functions, to support lots of JSON manipulates, such as, merge json, cut json, and so on.
- Dominant language
- C++
- Stars
- 976
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytedance/sonic-cpp
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
请问下,下个release版本有规划了吗 Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
对 parseImpl 进行优化 Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
sonic 能在 mac 上测试吗 Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
U64toa 单元测试用例不通过 Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in bytedance/sonic-cpp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ros2/message_filters#338 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
subsurface/subsurface#4984 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·