You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,12 +227,16 @@ $...title
227
227
228
228
### Filters (`[?(EXPRESSION)]`)
229
229
230
-
Filters allow you to remove nodes from a selection using a Boolean expression. Within a filter, `@` refers to the current node and `$` refers to the root node in the target document. `@` and `$` can be used to select nodes as part of the expression.
230
+
Filters allow you to remove nodes from a selection using a Boolean expression. Within a filter, `@` refers to the current node and `$` refers to the root node in the target document. `@` and `$` can be used to select nodes as part of the expression. Since version 0.3.0, the parentheses are optional, as per the IETF JSONPath draft. These two examples are equivalent.
Comparison operators include `==`, `!=`, `<`, `>`, `<=` and `>=`. Plus `<>` as an alias for `!=`.
237
241
238
242
`in` and `contains` are membership operators. `left in right` is equivalent to `right contains left`.
@@ -286,8 +290,7 @@ And this is a list of areas where we deviate from the [IETF JSONPath draft](http
286
290
- The root token (default `$`) is optional.
287
291
- Paths starting with a dot (`.`) are OK. `.thing` is the same as `$.thing`, as is `thing`, `$[thing]` and `$["thing"]`.
288
292
- Nested filters are not supported.
289
-
- When a filter is applied to an object (mapping) value, we do not silently apply that filter to the object's values. See the "Existence of non-singular queries" example in the IETF JSONPath draft.
290
-
- Parentheses are required when writing filter selectors, as is common in existing JSONPath implementations. `$.some[?(@.thing)]` is OK, `$.some[[email protected]]` is not.
293
+
- We don't treat filter expressions without a comparison as existence test, but an "is truthy" test. See the "Existence of non-singular queries" example in the IETF JSONPath draft.
291
294
292
295
And this is a list of features that are uncommon or unique to Python JSONPath.
0 commit comments