maml
A Rust implementation of the MAML data format — a minimal, human-readable alternative to JSON, YAML, and TOML.
Installation
[]
= "0.1"
Usage
Parsing
use ;
let value = parse.unwrap;
assert_eq!;
assert_eq!;
Serializing
use ;
let value = Object;
let output = stringify.unwrap;
// {
// name: "maml"
// version: 1
// enabled: true
// }
Value type
Value supports indexing with ["key"] for objects and [0] for arrays, and provides accessor methods like
as_str(), as_i64(), as_bool(), as_array(), as_object(), get(key), and is_null().
MAML format
{
# Comments start with hash
key: "quoted string"
identifier_key: 42
array: [
"comma or newline separated"
true
null
3.14
]
raw_string: """
No escaping needed here.
Preserves \n and "quotes" as-is.
"""
}
See the full MAML specification.