Skip to main content

json

Macro json 

Source
macro_rules! json {
    (null) => { ... };
    ([ $($e:tt),* $(,)? ]) => { ... };
    ({ $($k:literal : $v:tt),* $(,)? }) => { ... };
    ($e:expr) => { ... };
}
Expand description

Builds a Value from JSON-like syntax, for tests and fixtures: json!({"a": [1, null, "x"]}).