facet-json
facet-json is the JSON serializer and deserializer for the facet ecosystem. It
reads and writes JSON for any type that derives Facet — no manual Serialize
or Deserialize implementations, no attribute-heavy schemas.
use Facet;
use ;
let json = r#"{"name":"Alice","age":30}"#;
let person: Person = from_str.unwrap;
assert_eq!;
assert_eq!;
let out = to_string.unwrap;
println!;
The primary entry points are [from_str] and [to_string] for the common case,
with [from_slice] / [to_vec] for byte-oriented callers and
[to_string_pretty] for human-readable output. Zero-copy deserialization of
&str fields is available via [from_str_borrowed].
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.