Yaml.parse.json: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/fmt/yaml.bend as Yaml Lines 16-23 of cswap-bend-cli@0.1.0.0/fmt/yaml.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/fmt/yaml.bend&start_line=16&end_line=23 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/fmt/yamlr.bend as R # JSON is YAML: a document that opens with `{` or `[` is read as JSON when it # is JSON (nested flow collections, quoted keys), else by the block reader. def parse.json(r: Result<&2, &2, String, Json.Json>, +s: String) -> Result<&2, &2, String, Json.Json>: match r: case Done{j}: Done{j} case Fail{e}: R.parse(s) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&name=parse https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json