cuelang.org/go@v0.13.0/cue/testdata/resolve/005_JSON.txtar (about)

     1  #name: JSON
     2  #evalPartial
     3  -- in.cue --
     4  a="a": 3
     5  b:     a
     6  o: {"a\nb": 2} // TODO: use $ for root?
     7  c: o["a\nb"]
     8  -- out/def --
     9  a: 3
    10  b: 3
    11  o: {
    12  	"a\nb": 2
    13  }
    14  c: 2
    15  -- out/export --
    16  a: 3
    17  b: 3
    18  o: {
    19  	"a\nb": 2
    20  }
    21  c: 2
    22  -- out/yaml --
    23  a: 3
    24  b: 3
    25  o:
    26    ? |-
    27      a
    28      b
    29    : 2
    30  c: 2
    31  -- out/json --
    32  {"a":3,"b":3,"o":{"a\nb":2},"c":2}
    33  -- out/legacy-debug --
    34  <0>{a: 3, b: 3, o: <1>{"a\nb": 2}, c: 2}
    35  -- out/compile --
    36  --- in.cue
    37  {
    38    a: 3
    39    b: 怈0;a怉
    40    o: {
    41      "a\nb": 2
    42    }
    43    c: 怈0;o怉["a\nb"]
    44  }
    45  -- out/eval/stats --
    46  Leaks:  0
    47  Freed:  6
    48  Reused: 3
    49  Allocs: 3
    50  Retain: 0
    51  
    52  Unifications: 6
    53  Conjuncts:    8
    54  Disjuncts:    6
    55  -- out/eval --
    56  (struct){
    57    a: (int){ 3 }
    58    b: (int){ 3 }
    59    o: (struct){
    60      "a\nb": (int){ 2 }
    61    }
    62    c: (int){ 2 }
    63  }