TOC Prev Next

JSON Sugar and other Goodness

Folding of Single-Field Structs

CUE allows a shorthand for structs with single members.

fold.cue:

outer middle inner: 3

$ cue export fold.cue

{
    "outer": {
        "middle": {
            "inner": 3
        }
    }
}