Serde CBOR
This crate implements the Concise Binary Object Representation from RFC 7049. It builds on Serde, the generic serialization framework for Rust. CBOR provides a binary encoding for a superset of the JSON data model that is small and very fast to parse.
Usage
Serde CBOR supports Rust 1.31 and up. Add this to your Cargo.toml
:
[]
= "0.10.2"
Storing and loading Rust types is easy and requires only minimal modifications to the program code.
use ;
use Error;
use File;
// Types annotated with `Serialize` can be stored as CBOR.
// To be able to load them again add `Deserialize`.
There are a lot of options available to customize the format.
To operate on untyped CBOR values have a look at the Value
type.
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.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.