Print.escape.scalar: def of emerging-ezjson@1.3.0.0 Import: import emerging-ezjson@1.3.0.0/src/print.bend as Print Lines 44-51 of emerging-ezjson@1.3.0.0/src/print.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezjson@1.3.0.0/src/print.bend&start_line=44&end_line=51 import Base # a scalar value as escape.plain writes it; any other code point as U+FFFD, # as Go's encoding/json writes invalid UTF-8 def escape.scalar(+cp: U32, ch: Char, ok: Bool) -> String: match ok: case True{}: escape.plain(cp, ch) case False{}: String.from_list([Char.from_u32(65533)]) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.from_u32 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.from_list https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/print.bend&name=escape.plain