def word

emerging-ezjson@1.3.0.0 · src/parse.bend:34

import emerging-ezjson@1.3.0.0/src/parse.bend as Parse
import Base
import emerging-ezjson@1.3.0.0/src/value.bend as V

34# a bare word as a value: null, true, false, else a number kept as text
35def word(+raw: String) -> V.Json:
36  Bool.pick(V.Json, String.eq(raw, "null"), V.JNull{},
37    Bool.pick(V.Json, String.eq(raw, "true"), V.JBool{True{}},
38      Bool.pick(V.Json, String.eq(raw, "false"), V.JBool{False{}}, V.JNum{raw})))

Uses (5)

Used by (1)