-
Notifications
You must be signed in to change notification settings - Fork 201
Expand python-jsonpath-rw to support JSON Query (Feature request) #8
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
Comments
Very similar to #7 and thank you for the link. I have been convinced by you and @gregglind that many of these additions are worth trying. I will probably implement this soon:
I will happily accept pull requests for these features:
Here are some things that need to be improved: Instead of
We need explicit documentation of the semantics of every operator, independent of the host language or any other scripting language. This library is used for input into web sites, Excel formulae, SQL expressions, etc where the semantics of Python or JavaScript is neither relevant nor desirable. Dojo (like the original JSONPath write-up) could leave this out because of their audience and use cases. In #7 I proposed that the best options were a consistent global ordering or crashing on type issues. JS-like semantics are a good third option, but we need to document them clearly here since there are a lot of inconsistencies (if you haven't read http://wtfjs.com/ you certainly should) > 3 < "hello"
false
> "hello" < 3
false
> "hello" <= 3
false This is actually quite useful for querying JSON as it implicitly will filter out values that do not match your assumptions, but since it is inconsistent with the actual meaning of |
Having written a few JSON API9s) myself now in Python I'm more convinced of the need fr tools and libraries like this! I would +1 this but am still learning this library and whether or not it can solve by problem(s). Currently I am using jsonselect as a way of providing very naive querying capabilities on my API(s). Since jsonselect cannot for me solve:
I'm also considing ObjectPath and JSONiq |
Scratch JSONiq ;) Overkill and not really useful for Python nevermind it's endlessly deep complex dependencies, installation and usage :) |
Sadly this library jsonpath_rw won't solve my problem at hand either namely due to this Issue #8 -- I already have fairly decent Path Traversal via jsonselect |
+1 for JSON Query ;) |
Are there particular pieces of JSONQuery you are most interested in? I've ended up working on other things lately, but the pieces of this which are well-defined and requested will likely be implemented at some point. |
Can you shre what's coming in terms of "query/filtering" feature(s)? James Mills / prologic E: [email protected] On Tue, Jun 10, 2014 at 2:10 PM, Kenn Knowles [email protected]
|
Has there been any progress on implementing sorting. I looked into doing it myself and it wasn't clear what to do. My inclination was to treat it as a sort of |
Have you guys tried ObjectPath? For me quite a few things from the docs didn't work like slices, or |
Related bug: kennknowles#8
Related bug: kennknowles#8
Related bug: kennknowles#8
Related bug: kennknowles#8
Related bug: kennknowles#8
Related bug: kennknowles#8
Related bug: kennknowles#8
Related bug: kennknowles#8
JSON Query is a superset of JSON Path that includes filtering, mapping and transformations: http://www.sitepen.com/blog/2008/07/16/jsonquery-data-querying-beyond-jsonpath/
The text was updated successfully, but these errors were encountered: