1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! A parser and serializer for [MAML](https://maml.dev) (Minimal Abstract Markup Language) — a
//! minimal, human-readable data format.
//!
//! # Quick start
//!
//! ```
//! use maml::{parse, stringify, Value};
//!
//! // Parse a MAML string into a Value
//! let value = parse(r#"{name: "maml", version: 1}"#).unwrap();
//! assert_eq!(value["name"], Value::String("maml".into()));
//!
//! // Serialize a Value back to a MAML string
//! let output = stringify(&value).unwrap();
//! assert_eq!(output, "{\n name: \"maml\"\n version: 1\n}");
//! ```
//!
//! # Serde support
//!
//! With the `serde` feature (enabled by default), you can serialize and deserialize
//! any type that implements `Serialize`/`Deserialize`:
//!
//! ```
//! use serde::{Serialize, Deserialize};
//!
//! #[derive(Serialize, Deserialize, PartialEq, Debug)]
//! struct Config {
//! name: String,
//! port: u16,
//! debug: bool,
//! }
//!
//! let config = Config { name: "app".into(), port: 8080, debug: false };
//!
//! // Serialize to MAML
//! let s = maml::to_string(&config).unwrap();
//!
//! // Deserialize from MAML
//! let back: Config = maml::from_str(&s).unwrap();
//! assert_eq!(config, back);
//! ```
//!
//! To use this crate without serde, disable default features:
//!
//! ```toml
//! [dependencies]
//! maml = { version = "0.1", default-features = false }
//! ```
//!
//! # MAML format
//!
//! ```text
//! {
//! # 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 specification at <https://maml.dev>.
pub use Error;
pub use parse;
pub use stringify;
pub use Value;
pub use ;
pub use to_string;