Toon.to_toon: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/fmt/toon.bend as Toon Lines 10-29 of cswap-bend-cli@0.1.0.0/fmt/toon.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/fmt/toon.bend&start_line=10&end_line=29 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import bend-toon-codec@0.1.0.0/main.bend as Toon def to_toon(j: Json.Json) -> Toon.Json: match j: case Json.JNull{}: Toon.JNull{} case Json.JBool{b}: Toon.JBool{b} case Json.JNum{t}: Toon.JNum{t} case Json.JStr{s}: Toon.JStr{s} case Json.JArr{x}: Toon.JArr{to_toon(x)} case Json.JObj{x}: Toon.JObj{to_toon(x)} case Json.JNil{}: Toon.JNil{} case Json.JCons{h, t}: Toon.JCons{to_toon(h), to_toon(t)} case Json.JField{k, v, t}: Toon.JField{k, to_toon(v), to_toon(t)} Uses (2): https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/main.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json