https://github.com/olback/djson-rs
Dynamic JSON in Rust
https://github.com/olback/djson-rs
json rs rust
Last synced: about 1 year ago
JSON representation
Dynamic JSON in Rust
- Host: GitHub
- URL: https://github.com/olback/djson-rs
- Owner: olback
- License: apache-2.0
- Created: 2020-09-16T16:22:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-16T17:15:14.000Z (over 5 years ago)
- Last Synced: 2025-03-09T10:33:42.198Z (about 1 year ago)
- Topics: json, rs, rust
- Language: Rust
- Homepage: https://crates.io/crates/djson
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# djson - Access Dynamic JSON in Rust
Example:
```rust
let json_str = include_str!("../test.json");
let value: Value = djson::from_str(json_str).unwrap();
let idxs = Index::parse("four[2].one").unwrap();
let res = djson::get_value(&value, &idxs);
println!("{:#?}", res);
let res = djson::get_value_dyn(&value, &[&"four", &2, &"one"]);
println!("{:#?}", res);
```