6 releases

0.1.5 Aug 26, 2024
0.1.4 Aug 6, 2024

#1208 in Parser implementations

28 downloads per month
Used in http-srv

MIT license

26KB
722 lines

Json parser for rust


lib.rs:

Json parser

Example

use json::Json;

let j = Json::deserialize(r#"{
    "array" : [ 1, 2, "3", null ],
    "true" : true,
    "nested" : {
        "inner" : []
    }
}"#).unwrap();

let Json::Object(map) = j else { panic!() };
assert!(
    matches!(
        map.get("true"),
        Some(Json::True)));

No runtime deps

~0–0.9MB