| Crates.io | json-parser |
| lib.rs | json-parser |
| version | 1.0.2 |
| created_at | 2019-07-06 11:03:22.174492+00 |
| updated_at | 2019-07-06 13:05:27.781425+00 |
| description | JSON parser |
| homepage | https://github.com/venil7/json_parser/blob/master/README.md |
| repository | https://github.com/venil7/json_parser |
| max_upload_size | |
| id | 147094 |
| size | 13,248 |
JSON tokenizer and parser. JSON format supports following types:
Number, translates to Rust f68String, translates to Rust owned StringVec<T>, where T is one of the listed typesHashMap<String, T>, where T is one of the listed typesis defined as follows:
pub enum Json {
Null,
Bool(bool),
Number(f64),
String(String),
Array(Vec<Box<Json>>),
Object(HashMap<String, Box<Json>>),
}
This enum implements FromStr trait and therefore can be used as follows:
let value: Json = json_string.parse::<Json>()?;
Add to your Cargo.toml
json-parser = "1"