Expand description
The text form of every tool: one record per line, | between columns,
strings of the program in JSON quotes.
Strings come from the program under audit, so whatever could break a line or change how it reads is escaped: control characters, the line and paragraph separators, the bidirectional controls that reorder the text around them, and the invisible format characters (zero-width spaces and joiners, the byte order mark, tag characters). A row then shows exactly the code points it holds, and reads back with any JSON parser.
Functionsยง
- must_
escape - Whether
cis written as a\uescape rather than as itself: a control character, a line or paragraph separator, or a format character (Unicode category Cf: bidirectional controls, zero-width characters, the byte order mark, tag characters, and the rest). - push_
unicode_ escape - Append the
\uescape ofc: one per UTF-16 unit, as JSON writes a character beyond the BMP. - quote_
into - Append
sin double quotes, escaped as JSON does (\",\\,\n,\t,\r) and every other charactermust_escapenames as\uXXXX, so it stays on one line and shows what it holds. - quoted
sin double quotes (quote_into).- value
- The value of a
key=valuepair: as it is, orquotedwhen it is empty or holds whitespace, a quote, a backslash,=or a charactermust_escapenames, which would otherwise blur where the pair ends or what it says.