-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(p/json): JSON path support #1937
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1937 +/- ##
==========================================
+ Coverage 63.09% 63.15% +0.05%
==========================================
Files 563 563
Lines 79273 79515 +242
==========================================
+ Hits 50015 50215 +200
- Misses 25893 25933 +40
- Partials 3365 3367 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hello @notJoon . Some CI tests from Sept. 3 failed. Maybe merge master again to see if they pass? |
It causes an unknown panic, so I'll leave it in draft until I resolve it. |
Only 3 failed tests this time :-) . |
I think the "examples/fmt" failure is easy to fix. "Some gno files are not formatted, please run 'make fmt'." |
Removed the |
Description
Implemented a feature that parses JSONPath expression using a state machine and extracts data matching the specified path from the input JSON data.
JSONPath is an expression used to select and filter specific data within a JSON data. This implementation supports the basic functionalities of JSONPath.
Here's a table summarizing the supported JSONPath features now:
$
)$.store.book[0].title
*
)$.store.*
[]
)$.store.book[0]
..
)$..price
:
)$.store.book[0:2]
Currently, This implementation focuses on the basic functionality of JSON path expressions to prevent the size of PR is bigger. So, the filter expressions(
?(@)
) are not implemented yet. but this feature will be added with complex filtering and built-in functions.I expect, with this JSONPath parser, users can easily extract and utilize desired information from within JSON data.