-
Notifications
You must be signed in to change notification settings - Fork 25
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
Are we interested in SQL/JSON Path Expressions? #61
Comments
See #10 for a WIP implementation against Postgres' implementation. |
I am very interested in that standard because it adds useful things on top of jsonpath making it a expression language that allows arithmetic operations, using variables, date conversion and more. I found it available to download (copy right protect but free to read) After the first standard of jsonPath it could be possible to add some of the futures step by step or use this ideas for standards build on top of JSONPath something like a "Json Path Expression Language". We could also already start collecting ideas like making brakets optional for filtering expressions for future versions of the standard. |
I agree. It seems to me that for "legacy JSONPath", the only standard that matters is the emerging SQL/JSON standard, that is what Google, Amazon, Microsoft and Oracle appear to be coalescing around. It would be interesting to have some columns in the comparison table that show what they produce, also covering functions. "New JSONPath" that innovates will likely want to be compatible with that. |
SQL/JSON path language has been standardized via ISO in 2016 and a new revision in 2021 (ISO/IEC 19075-6:2021, section 7). The syntax shares some parts with JSONPath and its is obviously inspired by it, but it is an independent query language. Here is a quote from a draft from 2014 (the current standard is not publicly available) to give some context:
From a technical point of view there is no need to include SQL/JSON Path in this comparison, but from a practical point of view it is very relevant because
I think the issue could best be addressed by
|
Thanks for the context. If you like to sponsor (even if it's just part of the changes), feel free to have at it! |
I stumbled upon this issue while I was working on a service compliant with the Web of Things Thing Description Directory specification. As you can see the service exposes a search endpoint that accepts JSONPath. Not sure if it might be helpful to somebody else but we ended up creating a simple library that translates the current IETF working draft to SQL/JSONPath. Sadly, it is a lossy conversion but it works quite well in our use cases. Currently, the known limitations are listed in the README but there are probably more when considering the Descendant Selector and AbsolutePaths in filters. I want to thank @nichtich for #61 (comment) it was an eye opener 😄 and I agree that some text would be helpful for newcomers. |
Looks like SQL has a quasi? standard for something similar to JSONPath. Is it similar enough that we should care?
The text was updated successfully, but these errors were encountered: