Skip to content
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

Non-JSON evaluation targets #75

Open
Horusiath opened this issue Oct 27, 2024 · 1 comment
Open

Non-JSON evaluation targets #75

Horusiath opened this issue Oct 27, 2024 · 1 comment

Comments

@Horusiath
Copy link

Horusiath commented Oct 27, 2024

Hi, I'm trying to use this project to introduce some JSON Path support for other (non-serde-json) document-tree formats. It would be great if this library could work as a foundation for evalution of formats like ie. CBOR or document-like DBs.

Currently it's not possible to build your own query evaluator using this library. The bare minimum requires access to whole parse tree of JsonPath including ie. pattern match over JsonPathIndex/Function which are not part of the public API (jsonpath_rust::model is pub(crate)).

Another idea would be to introduce a generic trait to simplify evaluation model - given implementations for methods such as iterate / access-by-field / access-by-index etc. - which are specific to target tree-type we're querying over - I think the whole JSON Path query evaluation could be made pretty generic.

@besok
Copy link
Owner

besok commented Oct 28, 2024

Hi!
Have you had a look into JsonLike trait?

The source is here

Do you think it is what you need?

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

No branches or pull requests

2 participants