facet-json 0.1.1

JSON serialization and deserialization for Facet types
Documentation

facet-json

experimental free of syn crates.io documentation MIT/Apache-2.0 licensed

Thanks to all individual and corporate sponsors, without whom this work could not exist:

Provides JSON serialization and deserialization for any type that implements Facet.

Example

# use facet_trait::Facet;
# use facet_derive::Facet;
# use facet_trait as facet;

#[derive(Debug, Facet, PartialEq)]
struct User {
    name: String,
    age: u64,
}

let json = r#"{"name": "Alice", "age": 30}"#;
let user: User = facet_json::from_str(&json).unwrap();
assert_eq!(user, User { name: "Alice".into(), age: 30 });

License

Licensed under either of:

at your option.