Macro minimo::tree

source ·
macro_rules! tree {
    ($val:expr) => { ... };
}
Expand description

tree! macro prints a tree of the provided serializable object eg. tree!(json!({“hello”:“world”})) prints:

╭─ (Object)
│ hello: "world"
╰─—

tree!(json!(“name”:“john”,“age”:30,“address”:{“street”:“123 main st”,“city”:“new york”,“state”:“ny”},“children”:[“jane”,“joe”])) prints:

╭─ (Object)
│ name: "john"
│ age: 30
│ address (Object)
│ │ street: "123 main st"
│ │ city: "new york"
│ │ state: "ny"
│ ╰─—
│ children (Array)
│ │ 0: "jane"
│ │ 1: "joe"
│ ╰─—
╰─—