Skip to content

feat: support jsonpath#126

Open
yangzhg wants to merge 3 commits intobytedance:masterfrom
yangzhg:oss
Open

feat: support jsonpath#126
yangzhg wants to merge 3 commits intobytedance:masterfrom
yangzhg:oss

Conversation

@yangzhg
Copy link
Contributor

@yangzhg yangzhg commented Feb 9, 2026

  • Refactored the GetByJsonPath function by extracting the core logic into a new GetByJsonPathInternal method to avoid redundant DOM parsing.
  • Added GetByJsonPaths, a new function that supports querying multiple JSON paths in a single operation, which improves performance by parsing the JSON document only once.
  • Updated tests:
  • Added ValidBatchOK utility to validate the results of batch processing.
  • Introduced new test cases (WildCardBatch and BadBatch) to ensure correct handling of valid and invalid JSON with multiple paths.
  • Minor formatting improvements and inclusion of the <algorithm> header.
  • support escape emoji and customed float

feat: support escape emoji and customed float

feat: Refactor GetByJsonPath and add batch processing for multiple JSON
paths (bytedance#97)

- Refactored the `GetByJsonPath` function by extracting the core logic
into a new `GetByJsonPathInternal` method to avoid redundant DOM
parsing.
- Added `GetByJsonPaths`, a new function that supports querying multiple
JSON paths in a single operation, which improves performance by parsing
the JSON document only once.
- Updated tests:
- Added `ValidBatchOK` utility to validate the results of batch
processing.
- Introduced new test cases (`WildCardBatch` and `BadBatch`) to ensure
correct handling of valid and invalid JSON with multiple paths.
- Minor formatting improvements and inclusion of the `<algorithm>`
header.
@yangzhg yangzhg force-pushed the oss branch 2 times, most recently from 8fe0f96 to 3d74eba Compare February 9, 2026 11:33
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 58.19975% with 339 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.90%. Comparing base (4250a05) to head (e55bf1b).
⚠️ Report is 19 commits behind head on master.

Files with missing lines Patch % Lines
include/sonic/internal/arch/simd_skip.h 57.61% 29 Missing and 99 partials ⚠️
include/sonic/dom/parser.h 36.90% 34 Missing and 19 partials ⚠️
include/sonic/jsonpath/jsonpath.h 58.62% 9 Missing and 39 partials ⚠️
include/sonic/jsonpath/dom.h 15.38% 9 Missing and 24 partials ⚠️
include/sonic/jsonpath/ondemand.h 72.15% 1 Missing and 21 partials ⚠️
include/sonic/dom/dynamicnode.h 75.00% 7 Missing and 9 partials ⚠️
include/sonic/dom/serialize.h 50.00% 3 Missing and 11 partials ⚠️
include/sonic/dom/genericnode.h 57.69% 3 Missing and 8 partials ⚠️
include/sonic/experiment/lazy_update.h 25.00% 0 Missing and 6 partials ⚠️
include/sonic/dom/handler.h 66.66% 0 Missing and 3 partials ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
- Coverage   74.79%   71.90%   -2.90%     
==========================================
  Files          21       26       +5     
  Lines        2436     3413     +977     
  Branches      667     1076     +409     
==========================================
+ Hits         1822     2454     +632     
+ Misses        297      194     -103     
- Partials      317      765     +448     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants