Json¶
Import: import system.json;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
Json¶
The public JSON API: one pair of names for text <-> value.
serialize¶
Encodes value as JSON text. User-defined types need @json.
deserialize¶
Decodes JSON text as T, returning ParseError if it cannot be decoded. User-defined types need @json.
from_value¶
Reconstruct a @json value from an already-parsed JsonValue (no parse step).
serialize_pretty¶
Pretty-prints a JsonValue with newlines and indent spaces per nesting level. Pass 0 to produce compact JSON text.