No description
Find a file
2017-02-25 03:11:20 -05:00
src Initial 2017-02-20 11:22:19 -08:00
tests Initial 2017-02-20 11:22:19 -08:00
.gitignore Initial 2017-02-20 11:22:19 -08:00
build.rs Initial 2017-02-20 11:22:19 -08:00
Cargo.lock JSON rust implementation recipe 2017-02-25 03:11:20 -05:00
Cargo.toml JSON rust implementation recipe 2017-02-25 03:11:20 -05:00
README.md JSON rust implementation recipe 2017-02-25 03:11:20 -05:00

#JSON

##JSON implementation in Rust:

json


#[macro_use]
extern crate json;

fn main() {

let parsed = json::parse(r#"

{
    "code": 200,
    "success": true,
    "payload": {
        "features": [
            "awesome",
            "easyAPI",
            "lowLearningCurve"
        ]
    }
}

"#).unwrap();

let instantiated = object!{
    "code" => 200,
    "success" => true,
    "payload" => object!{
        "features" => array![
            "awesome",
            "easyAPI",
            "lowLearningCurve"
        ]
    }
};

assert_eq!(parsed, instantiated);

}

License

MIT/Apache-2.0