Crates.io | mason-rs |
lib.rs | mason-rs |
version | 0.4.0 |
created_at | 2025-08-01 16:33:06.525113+00 |
updated_at | 2025-08-28 10:05:01.526552+00 |
description | A rust implementation of MASON, a JSON-like object notation. |
homepage | |
repository | https://github.com/Emilinya/mason-rs |
max_upload_size | |
id | 1777085 |
size | 153,203 |
This is a rust implementation of MASON, a JSON-like object notation.
MASON data can be deserialized to a Rust data structure using
pub fn from_reader<'de, T, R>(reader: R) -> Result<T>
where
T: Deserialize<'de>,
R: Read + 'de;
There are also two alternate functions for common use cases:
pub fn from_slice<'de, T: Deserialize<'de>>(bytes: &'de [u8]) -> Result<T>;
pub fn from_str<'de, T: Deserialize<'de>>(string: &'de str) -> Result<T>;
A Rust data structure can be serialized to MASON using
pub fn to_writer<T: Serialize, W: Write>(value: &T, writer: &mut W) -> Result<()>;
See the documentation for more info.
To run tests, run cargo test
or make check
.
This will download the MASON test suite and run it against this implementation.