Skip to content

Commit 0e5e7fc

Browse files
Merge branch 'besok:main' into compiled_path_test_suite_c
2 parents 0b7c34c + 74c2393 commit 0e5e7fc

File tree

6 files changed

+326
-12
lines changed

6 files changed

+326
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,8 @@
6565
- **`1.0.1`**
6666
- add method to process parsed query
6767
- **`1.0.2`**
68-
- improve grammar
68+
- improve grammar
69+
- **`1.0.3`**
70+
- change String to str for as objects
71+
- **`1.0.4`**
72+
- added function to remove a part by path

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "jsonpath-rust"
33
description = "The library provides the basic functionality to find the set of the data according to the filtering query."
4-
version = "1.0.2"
4+
version = "1.0.4"
55
authors = ["BorisZhguchev <[email protected]>"]
66
edition = "2021"
77
license = "MIT"
@@ -17,8 +17,8 @@ regex = "1"
1717
pest = "2.7.15"
1818
pest_derive = "2.7.15"
1919
thiserror = "2.0.9"
20-
jsonpath-rust-impl = {path = "jsonpath-rust-impl", optional = true}
21-
jsonpath-ast = {path = "jsonpath-ast"}
20+
jsonpath-rust-impl = {path = "jsonpath-rust-impl", optional = true, version = "0.1.0"}
21+
jsonpath-ast = {path = "jsonpath-ast", version = "0.1.0", features = ["compiled-path"]}
2222

2323
[dev-dependencies]
2424
serde = { version = "1.0", features = ["derive"] }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ The path is supported with the limited elements namely only the elements with th
226226
{"verb": "DO NOT RUN"}
227227
]);
228228

229-
let path = json.query_only_path("$.[?(@.verb == 'RUN')]")?;
229+
let path = json.query_only_path("$[?(@.verb == 'RUN')]")?;
230230
let elem = path.first().unwrap_or_default();
231231

232232
if let Some(v) = json

jsonpath-rust-impl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2024"
77
proc-macro = true
88

99
[dependencies]
10-
jsonpath-ast = { path = "../jsonpath-ast", features = ["compiled-path"] }
10+
jsonpath-ast = { path = "../jsonpath-ast", features = ["compiled-path"], version = "0.1.0" }
1111
syn = "2.0.101"
1212
proc-macro2 = "1.0.95"
1313
quote = "1.0.40"

src/query.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,16 @@ mod tests {
170170
],
171171
"expensive": 10 }"#
172172
}
173+
174+
#[test]
173175
fn update_by_path_test() -> Queried<()> {
174176
let mut json = json!([
175177
{"verb": "RUN","distance":[1]},
176178
{"verb": "TEST"},
177179
{"verb": "DO NOT RUN"}
178180
]);
179181

180-
let path = json.query_only_path("$.[?(@.verb == 'RUN')]")?;
182+
let path = json.query_only_path("$[?(@.verb == 'RUN')]")?;
181183
let elem = path.first().cloned().unwrap_or_default();
182184

183185
if let Some(v) = json

0 commit comments

Comments
 (0)