| cmp stdout expect-stdout-cue |
| title = "Folding of Single-Field Structs" |
| In JSON, one defines nested values, one value at a time. |
| Another way to look at this is that a JSON configuration is a set of |
| In CUE one defines a set of paths to which to apply |
| a concrete value or constraint all at once. |
| Because of CUE's order independence, values get merged |
| This example shows some path-value pairs, as well as |
| a constraint that is applied to those to validate them. |
| This also gives a handy shorthand for writing structs with single |
| // collection-constraint pair |
| outer: [string]: inner: int |