TOC Prev Next

JSON Sugar and other Goodness

Folding all Fields

This also works if a struct has more than one member.

In general, any JSON configuration can be expressed as a collection of path-leaf pairs without using any curly braces.

outer middle1 inner: 3
outer middle2 inner: 7
"outer": {
    "middle1": {
        "inner": 3
    },
    "middle2": {
        "inner": 7
    }
}