-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mention the License via name, so that its shown on https://crates.io/crates/jsonpath-rust instead of "non-standart", update to rust 2021 * provide a minimal example code, fix clippy issues and harden CI to verify everything * update README.md with most current usage. try to keep it simple, and link to docs as they are actually tested in CI via `cargo test`
- Loading branch information
Showing
8 changed files
with
101 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ name = "jsonpath-rust" | |
description = "The library provides the basic functionality to find the set of the data according to the filtering query." | ||
version = "0.6.0" | ||
authors = ["BorisZhguchev <[email protected]>"] | ||
edition = "2018" | ||
license-file = "LICENSE" | ||
edition = "2021" | ||
license = "MIT" | ||
homepage = "https://github.com/besok/jsonpath-rust" | ||
repository = "https://github.com/besok/jsonpath-rust" | ||
readme = "README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use jsonpath_rust::JsonPathInst; | ||
use serde_json::json; | ||
use std::str::FromStr; | ||
|
||
fn main() { | ||
let data = json!({ | ||
"Hello":"World", | ||
"Good":"Bye", | ||
}); | ||
let path = JsonPathInst::from_str("$.Hello").unwrap(); | ||
let search_result = jsonpath_rust::find(&path, &data); | ||
println!("Hello, {}", search_result); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters