Value.json.go: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/value.bend as Value Lines 303-328 of yaml-for-bend@0.1.1.0/value.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/value.bend&start_line=303&end_line=328 import Base def json.go(v: Yaml, +first: Bool) -> String: match v: case Null{}: "null" case Boolean{on}: Bool.pick(String, on, "true", "false") case Int{t}: t case Float{t}: json.float(t) case Str{t}: json.str(t) case Seq{xs}: match xs: case Nil{}: Bool.pick(String, first, "[]", "]") case Con{x, rest}: Bool.pick(String, first, "[", ",") ++ json.go(x, True{}) ++ json.go(Seq{rest}, False{}) case Mapping{es}: match es: case Nil{}: Bool.pick(String, first, "{}", "}") case Con{Entry{+k, x}, rest}: Bool.pick(String, first, "{", ",") ++ key.json(is_str(k), json.go(k, True{})) ++ ":" ++ json.go(x, True{}) ++ json.go(Mapping{rest}, False{}) case Tagged{tag, x}: json.go(x, True{}) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/value.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/value.bend&name=Yaml https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/value.bend&name=is_str https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/value.bend&name=json.float https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/value.bend&name=json.str https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/value.bend&name=key.json