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

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