-
Notifications
You must be signed in to change notification settings - Fork 17
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
JSONPath as a search query language #234
Comments
Has been resolved (we have to make it informative at best, which has been done) so I think we can close this issue. |
Discussion in 22.8:
|
Issue #129 closed, should carry forward items discussed there as appropriate here. Removing "Consolidation" label. |
FYI: JSONPath has just been released as RFC 9353 :) So for Discovery 2.0, we can use it as a normative reference. |
@JKRhb: I can't tell from skim-reading this RFC whether it includes a standardised operator/filter/selector/some other mechanism for filtering objects in an array by the presence of a string in an array inside the object. In #387 this is needed for searching a directory for Thing Descriptions which have a particular value in their e.g.
Can anyone figure out if there is now a standardised way to do this? Perhaps via some kind of nested match expression? Or are there implementations which support this latest RFC that we can experiment with? |
I only skimmed through the document myself so far, but at first glance, it seems to me as if you can use the filter selector for that. If I am not mistaken, with the RFC's syntax, the filter would then look something like this:
Edit: After some testing with one of the sandboxes, it seems as if the query should actually look like this (if I understood the examples you gave correctly):
|
According to this blog post, there are also at least these two online sandboxes available: |
We propose the use of JSONPath as one of the query languages in the discovery spec. However, we can't propose that as a normatice recommendation since the specification of JSONPath is not yet a standard.
We now have several issues addressing this very same problem:
The goal of this issue is solely to monitor the progress of JSONPath standardization.
IETF datatracker: https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base
Feature matrix of most existing implementations: https://cburgmer.github.io/json-path-comparison/#filter_expression_with_regular_expression
The text was updated successfully, but these errors were encountered: