-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
Description
We are erroneously raising a JSONPathSyntaxError
when non-singular filter queries appear in logical expressions.
Example:
import jsonpath
data = [
{
"a": "b",
"d": "e"
},
{
"b": "c",
"d": "f"
}
]
query = "$[?@..* && @.b]"
jsonpath.findall(query, data)
# JSONPathSyntaxError: non-singular query is not comparable, line 1, column 8
This would be the correct behaviour in a comparison expression, as non-singular queries can not be compared, but we are applying the same logic to logical expressions, which is bad.