type Json

emerging-ezjson@1.3.0.0 · src/value.bend:7

import emerging-ezjson@1.3.0.0/src/value.bend as Value
import Base

7# a JSON value; JNil, JCons and JPair are the cells of arrays and objects.
8# JSpan and JBind are the same string and key, as the first `n` chars of a
9# source suffix, so a parse does not copy that text.
10type Json is Data:
11  JNull{}
12  JBool{b: Bool}
13  JNum{raw: String}
14  JStr{s: String}
15  JArr{items: Json}
16  JObj{pairs: Json}
17  JNil{}
18  JCons{head: Json, tail: Json}
19  JPair{key: String, val: Json, rest: Json}
20  JSpan{src: String, n: U32}
21  JBind{src: String, n: U32, val: Json, rest: Json}

Uses (3)

Used by (371)