Subscriptable JSONPaths#12
Merged
dmlb2000 merged 39 commits intopacifica:masterfrom Mar 7, 2019
markborkum:feat-subscriptable-jsonpath
Merged
Subscriptable JSONPaths#12dmlb2000 merged 39 commits intopacifica:masterfrom markborkum:feat-subscriptable-jsonpath
dmlb2000 merged 39 commits intopacifica:masterfrom
markborkum:feat-subscriptable-jsonpath
Conversation
Copy files from https://github.com/markborkum/pacifica-jsonpath@jsonpath2 and merge conflicts.
Signed-off-by: David Brown <[email protected]>
Flake8 warned that the operator callables were globals. In a previous commit, the operator callables were refactored into method-locals in the operator's constructor. This is sufficient to resolve the flake8 warnings, but introduces a bug: since callables are created per instance, they have different memory locations, and hence, are not compatible with the `Node`-level definition of `__eq__`, which naively compares each `__dict__` of each operand. The fix is to refactor the operator callables into static methods.
Signed-off-by: David Brown <[email protected]>
Signed-off-by: David Brown <[email protected]>
In previous implementations of JSONPath, the current value is implicitly cast to array or object if the next node is an array index subscript or object index subscript. This introduces ambiguity: "is the index subscript referring to the current value, or a child value of the current value?" The solution is to use the wildcard "*" to refer to the child values explicitly.
Signed-off-by: David Brown <[email protected]>
Signed-off-by: David Brown <[email protected]>
Aim for feature parity with equivalent in Python programming language
Contributor
Author
|
@dmlb2000 |
Contributor
Author
|
@dmlb2000 Ready for review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds two new capabilities:
$["collection"][$["index"]]and$["collection"][$["indices"][*]].$["users"][*][?(@["password"] = @["password_confirmation"])].Issues Resolved
#11
Check List