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
{{ message }}
Repository navigation
Commit c4e58df
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
15
15
A flexible JSONPath engine for Python.
16
16
17
-
JSONPath is a mini language for extracting objects from data formatted in JavaScript Object Notation, or equivalent Python objects like dictionaries, and lists.
17
+
JSONPath is a mini language for extracting objects from data formatted in JavaScript Object Notation, or equivalent Python objects, like dictionaries and lists.
18
18
19
19
```python
20
20
import jsonpath
@@ -73,6 +73,12 @@ or [pip](https://pip.pypa.io/en/stable/getting-started/):
73
73
pip install python-jsonpath
74
74
```
75
75
76
+
or [pipx](https://pypa.github.io/pipx/)
77
+
78
+
```console
79
+
pipx install python-jsonpath
80
+
```
81
+
76
82
## API
77
83
78
84
### jsonpath.findall
@@ -99,7 +105,7 @@ Prepare a path for repeated matching against different data. `jsonpath.findall()
99
105
100
106
### async
101
107
102
-
`findall_async()` and `finditer_async` are async equivalents of `findall()` and `finditer()`. They are used by when integrating Python JSONPath with [Python Liquid](https://github.com/jg-rp/liquid) and use Python Liquid's [async protocol](https://jg-rp.github.io/liquid/introduction/async-support).
108
+
`findall_async()` and `finditer_async` are async equivalents of `findall()` and `finditer()`. They are used when integrating Python JSONPath with [Python Liquid](https://github.com/jg-rp/liquid) and use Python Liquid's [async protocol](https://jg-rp.github.io/liquid/introduction/async-support).
103
109
104
110
### Extra filter context
105
111
@@ -109,7 +115,7 @@ Use `#` to query extra filter data, similar to how one might use `@` or `$`.
109
115
110
116
## Syntax
111
117
112
-
Python JSONPath's default syntax is an opinionated combination of JSONPath features from existing, popular implementations, and much of the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11). If you're already familiar with JSONPath syntax, skip to [Notable differences](#notable-differences).
118
+
Python JSONPath's default syntax is an opinionated combination of JSONPath features from existing, popular implementations, and much of the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11). If you're already familiar with JSONPath syntax, skip to [notable differences](#notable-differences).
113
119
114
120
TODO: tree analogy / target document
115
121
TODO: use "node" terminology
@@ -244,6 +250,7 @@ This is a list of things that you might find in other JSONPath implementation th
244
250
- We don't support extension functions of the form `selector.func()`.
245
251
- We always return a list of matches from `jsonpath.findall()`, never a scalar value.
246
252
- We do not support arithmetic in filter expression.
253
+
- Python JSONPath is strictly read only. There are no update "selectors".
247
254
248
255
And this is a list of areas where we deviate from the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11).
0 commit comments