Expand description
Strict JSON (SPEC 6.1, I-JSON) and the RFC 8785 JSON Canonicalization Scheme (SPEC 6.2).
parse accepts exactly the texts SPEC 6.1 accepts and reports failures in the order it
defines. Value::to_jcs writes the RFC 8785 serialisation, including ECMAScript number
formatting, so it is a complete JCS even though Datumesh objects never contain JSON numbers.
Structs§
- Number
- A JSON number: the text it was written as, and its IEEE 754 double value.
Enums§
- Value
- A parsed JSON value. Object members keep their text order; names are unique.
Constants§
- MAX_
DEPTH - The deepest nesting of arrays and objects accepted (SPEC 6.1).
Functions§
- canonicalize_
json - Parses
bytesand returns their JCS serialisation. - check_
value_ depth - Checks that an already-parsed value nests at most
MAX_DEPTHarrays and objects (SPEC 6.1 applies the parser’s limit to values accepted in parsed form).E_PARSE_JSON. - format_
number - Formats a finite double as ECMAScript
Number.prototype.toStringdoes (RFC 8785 3.2.2.3). - parse
- Parses
bytesas strict JSON (SPEC 6.1).