#serialize-deserialize #amp #serialization #serde

serde_amp

Serialization/deserialization tooling for Asynchronous Messaging Protocol

2 unstable releases

0.2.0 Dec 9, 2022
0.1.0 Jan 23, 2018

#793 in Encoding

MIT/Apache

33KB
968 lines

serde_amp

build-and-check crates.io

A serialization/deserialization library for Asynchronous Messaging Protocol

Usage

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.

License

Like Serde, serde_amp is licensed under either of

at your option.`

Dependencies

~0.4–1MB
~24K SLoC