Fix logic of parsing function with no arguments.#990
Open
q2w wants to merge 3 commits intojson-path:masterfrom
Open
Fix logic of parsing function with no arguments.#990q2w wants to merge 3 commits intojson-path:masterfrom
q2w wants to merge 3 commits intojson-path:masterfrom
Conversation
Currently a function parameter with no arguments is not parsed correctly. Given `$.objects.keys().size()`, after encountering keys (a function with no arguments) the position should move from $.objects.keys`(`).size() to $.objects.keys()`.`size(). But in current implementation read position moves from $.objects.keys`(`).size() to $.objects.keys(`)`.size() This pull request will fix this issue.
Author
Contributor
|
Please provide a test in your PR that demonstrates a case. |
Add test case for fixing parsing logic for function with no arguments
Author
|
@kallestenflo Thanks! I have added a test case for the same. Json: JsonPath: Before this change, the test case is failing with below error. |
Author
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.
Currently a function with no arguments is not parsed correctly. Given
$.objects.keys().size(), after encountering keys (a function with no arguments) the position should move from $.objects.keys().size() to $.objects.keys().size(). But in current implementation read position moves from $.objects.keys().size() to $.objects.keys().size()This pull request will fix the issue.