type Val
import bend-kit-json@0.7.0.0/json.bend as Jsonimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
10# Num keeps the number's exact text, so no precision is lost. Obj keeps its
11# fields in document order, repeated keys included.
12type Val is Type:
13 Null{}
14 Flag{on: Bool}
15 Num{s: Bytes.Bytes}
16 Str{s: Bytes.Bytes}
17 Arr{xs: List<&1, Val>}
18 Obj{kvs: List<&1, Bytes.Bytes & Val>}