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
+18-8Lines changed: 18 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -244,22 +244,26 @@ This is enum type which represents:
244
244
245
245
-`Slice` - a point to the passed original json
246
246
-`NewValue` - a new json data that has been generated during the path( for instance length operator)
247
-
-`NoValue` - indicates there is no match between given json and jsonpath in the most cases due to absent fields or inconsistent data.
247
+
-`NoValue` - indicates there is no match between given json and jsonpath in the most cases due to absent fields or
248
+
inconsistent data.
248
249
249
250
To extract data there are two methods, provided on the `value`:
250
251
251
252
```rust
252
253
letv:JsonPathValue<Value> =...
253
254
v.to_data();
254
-
v.slice_or(&some_dafault_value)
255
+
v.slice_or(&some_dafault_value)
255
256
```
256
257
257
258
### Find
258
259
259
260
there are 4 different functions to find data inside a `value`.
260
-
All take references, to increase reusability. Especially json parsing and jsonpath parsing can take significant time, compared to a simple find.
261
+
All take references, to increase reusability. Especially json parsing and jsonpath parsing can take significant time,
262
+
compared to a simple find.
261
263
262
-
The methods `find`, `find_as_path`, `find_slice` and `find_slice_ptr` take the same inputs, but handle them differently depending on your usecase. They are further described in the [docs](https://docs.rs/jsonpath-rust/latest/jsonpath_rust/enum.JsonPath.html#implementations).
264
+
The methods `find`, `find_as_path`, `find_slice` and `find_slice_ptr` take the same inputs, but handle them differently
265
+
depending on your usecase. They are further described in
266
+
the [docs](https://docs.rs/jsonpath-rust/latest/jsonpath_rust/enum.JsonPath.html#implementations).
0 commit comments