-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
jsonpath2 version
0.4.4
Platform Details
macOS Catalina, Python 3.8.4
Scenario:
In test case 10, you have:
expr = Path.parse_str('$..book[*][?(@.author = "Nigel Rees")]')This seems correct. The behavior in jsonpath2 is correct though in http://jsonpath.com the behavior is different and is incorrect.
Another query that should result in the same results is:
expr = Path.parse_str('$..book[?(@.author = "Nigel Rees")]')This should return a list of dict that filters only the author. In jsonpath2 this yields no results (and empty list). Yet on http://jsonpath.com, this works fine.
My understanding of the JsonPath spec is that this second query is valid and should result in what jsonpath2 is doing in test case #10. This understanding comes from the section on the JsonPath spec:
| //book[price<10] | $..book[?(@.price<10)] | filter all books cheapier than 10 |
|---|
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels