-
Notifications
You must be signed in to change notification settings - Fork 13
Implement callable subscripts #14
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
Conversation
Implements `length()` function for JSON arrays, and `entries()`, `keys()` and `values()` functions for JSON objects.
Signed-off-by: David Brown <[email protected]>
…n-jsonpath2 into feat-callables
|
@markborkum I did update the version of pylint on you, since we are supporting Python 3.x only. That means we can push pylint beyond 1.x now. |
|
@dmlb2000 Sounds good. I'm working on 100% coverage at the moment. Then I'll circle back to the |
|
@markborkum There was an interesting duplicate key in hash warning from flake8 as well did you see that? |
|
@dmlb2000 I think that we should pause work on this branch. There are two issues:
The first issue is what it is, but we need to decide the second issue. At the moment, the coverage is very low. |
|
@markborkum What other functions would need to be implemented to cover the ECMAScript standard? |
|
@dmlb2000 The following should be covered:
JSON:
Math:
|
|
@markborkum This is a lot, we'll leave this open for folks to contribute too and hopefully we can get some community support for this. Thanks for your effort! |
|
@khm Your thoughts about coverage? |
I think it would be worth raising an unsupported exception of some kind instead of requiring full coverage as a release condition. That way we can accept community contributions as need arises. If I'm answering the wrong question, let me know. |
Signed-off-by: David Brown <[email protected]> Conflicts: jsonpath2/expressions/operator.py jsonpath2/node.py jsonpath2/path.py jsonpath2/subscript.py
|
@markborkum This is ready to merge? |
|
So to be clear for others coming into this bug... We are going to merge this in, even though the pull request is technically incomplete. This will provide folks with working functions in a jsonpath. The future work is to be explicit about what functions we support and what functions are not completed. We will have future effort to make it easy for folks to add new functions to extend the jsonpath spec. Example pull requests will be referenced here for folks to have a path forward to extend jsonpath. |
Implements
length()function for JSON arrays, andentries(),keys()andvalues()functions for JSON objects.Description
n/a
Issues Resolved
n/a
Check List