Crates.io | serde_amp |
lib.rs | serde_amp |
version | 0.2.0 |
source | src |
created_at | 2018-01-23 18:56:14.768609 |
updated_at | 2022-12-09 05:35:10.408212 |
description | Serialization/deserialization tooling for Asynchronous Messaging Protocol |
homepage | |
repository | https://github.com/rockstar/serde_amp |
max_upload_size | |
id | 48078 |
size | 44,743 |
A serialization/deserialization library for Asynchronous Messaging Protocol
extern crate serde_amp;
use serde_amp;
#[derive(Deserialize, Serialize)]
struct AnStruct {
count: usize,
tag: String
}
fn main() {
let an_struct = AnStruct { count: 83, tag: "an-tag" };
let serialized = serde_amp::to_amp(&an_struct).unwrap();
let deserialized = serde_amp::from_bytes(&serialized[..]).unwrap();
}
Note: While to_amp
can serialize standard types like usize
, AMP itself is a
key/value protocol, and should be used with key/value types.
Like Serde, serde_amp is licensed under either of
at your option.`