sileht / python-jsonpath-rw-ext

Extensions for JSONPath RW
Apache License 2.0
59 stars 19 forks source link

Equality filter should use '==' instead of '=' #18

Open hansthen opened 6 years ago

hansthen commented 6 years ago

At least, that is how several other jsonpath implementations implement this.

E.g. the expression $.[?(@.foo='bar')] fails to parse in jayway's JsonPath implementation. In the implementation here, = is used for assignment to the attribute and == is used to compare for equality.

plbertrand commented 5 years ago

I would also point out that for regex, it should also be =~.