remove pin on jsonpath-ng and fix issue #2
Merged
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.
We had to pin
jsonpath-ng
to 1.5.3 following an update from the library. The following line from the change log is responsible:Basically, the matched path was returned with quotes when accessing from
match.full_path
ormatch.path
, which lead to issue in matching.We manually remove the
'
from the field in order to have the same behavior as before.Example from
test_dot_in_skip_verification_path
:Skipped paths:
["$..aab", "$..b.'a.aa'"]
Matching the fields for
"$..b.'a.aa'"
Before the fix:
1.5.3
/ match full path =key_a.b.a.aa
/ return value frombuild_full_path_nodes
=["key_a", "b", "a.aa"]
>1.6
/ match full path =key_a.b.'a.aa'
/ return value frombuild_full_path_nodes
=["key_a", "b", "'a.aa'"]
I believe we now could also use a regex instead of the whole
build_full_path_nodes
, which would basically split on.
not being enclosed in'
, but my regex knowledge is lacking 😬This simple fix will allow us to unpin for now.