8 releases

0.3.2 Oct 16, 2023
0.3.1 Sep 12, 2023
0.3.0 Mar 27, 2023
0.2.1 Mar 7, 2023
0.1.4 Feb 10, 2023

#380 in Encoding

Download history 1/week @ 2024-02-22 1/week @ 2024-02-29 192/week @ 2024-03-07 52/week @ 2024-03-14 8/week @ 2024-03-28

252 downloads per month

MIT/Apache

475KB
11K SLoC

Serde EnCom

Crate API

Made to replace old and loved JSON

EnCom specification

As long as you use standard serialization, and don't use serde_bytes, then the serialization output will be a valid string (utf8, not binary).

If you are using string &str or byte &[u8] slice in your resulting structure, it will not be copied (Zero-copy).

You can try encom_from_json!() macro to convert your own JSON and test it. Resulting EnCom will be sorted alphabetically.

Todo:

  • Skip Option::None by default, and only if #[serde(serialize_with = "path")] is passed, then serialize None
  • Fix Stream deserializer
  • Fix File deserializer
  • Fix extra space after } in serializer
  • Fix parse exponent in deserializer
  • Change errors

Thanks serde_json and it's contributors for the base code that was used it this project

Dependencies

~280–710KB
~14K SLoC