src/print.bend checks
raw source on the hub · import emerging-ezjson@1.1.0.0/src/print.bend as Print
src/print: a value as compact or indented JSON text.
2 imports
import Base import ./value.bend as V
Definitions
def escape.nib.go source · line 5 · raw
@+nn:U32 -> @digit:Bool -> Char
def escape.nib source · line 12 · raw
@+nn:U32 -> Char
def escape.u source · line 15 · raw
@+cp:U32 -> String
def escape.rest.go source · line 18 · raw
@+cp:U32 -> @ch:Char -> @ctrl:Bool -> String
def escape.rest source · line 25 · raw
@+cp:U32 -> @ch:Char -> String
def scalar source · line 30 · raw
@+cp:U32 -> Bool
whether a code point is a Unicode scalar value: not a surrogate, and not past U+10FFFF. No UTF-8 JSON text can hold any other
def escape.plain source · line 34 · raw
@+cp:U32 -> @ch:Char -> String
one scalar value, escaped when JSON requires it
def escape.scalar source · line 46 · raw
@+cp:U32 -> @ch:Char -> @ok:Bool -> String
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.char source · line 54 · raw
@+ch:Char -> String
one char of a string
def escape source · line 59 · raw
@cs:List<&2, Char> -> String
the chars of a string with quotes, backslashes, and controls escaped
def quote source · line 67 · raw
@txt:String -> String
a string in quotes, escaped
def print source · line 71 · raw
@val:0x81c67699424929b5c44cd8577e18117f/src/value.Json -> String
a value as compact JSON
def pretty.go source · line 107 · raw
@val:0x81c67699424929b5c44cd8577e18117f/src/value.Json -> @+pad:String -> @+close:String -> String
a value as indented JSON. pad is the spaces a value's lines start with,
after their newline. For a chain of cells, a newline and pad start each
element or member, and close follows the last one, before the bracket
def pretty source · line 148 · raw
@val:0x81c67699424929b5c44cd8577e18117f/src/value.Json -> String
a value as JSON indented two spaces a level, one element or member a line
def maybe source · line 152 · raw
@mb:Maybe<&2, 0x81c67699424929b5c44cd8577e18117f/src/value.Json> -> String
a parse result: the value, or "<bad>"