Skip to content

Commit 0875a88

Browse files
committed
fix(jsonpath): Fix parenthesis for jsonpath-ng 1.8.0
1 parent 0ec5cec commit 0875a88

2 files changed

Lines changed: 43 additions & 67 deletions

File tree

pdm.lock

Lines changed: 41 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/REST/keywords.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,8 @@ def _find_by_field(self, field, return_schema=True, print_found=True):
15311531
"JSONPath query '%s' " % (field) + "did not match anything."
15321532
)
15331533
for match in matches:
1534-
path = match.replace("[", "").replace("]", "").split(".")
1534+
match_str = match.replace("(", "").replace(")", "")
1535+
path = [part.strip("'\"[]") for part in match_str.split(".")]
15351536
paths.append(path)
15361537
else:
15371538
value = last_instance

0 commit comments

Comments
 (0)