std::encoding::jsonJSON values with automatic cleanup and independent copies.
Inspect values with checked accessors. Mutate a var value with set
or push; supplied children remain usable and independent.
parseParse JSON, retaining the parser's diagnostic on failure.
from_u64Construct an exact unsigned integer, including values above i64's range.
from_floatConstruct a finite float; JSON cannot represent NaN or infinity.
from_stringfrom_boolnullencodeEncode any data value as JSON text. Records encode as objects keyed by field name in declaration order.
decodeDecode JSON text as T. A failure names the path of the value that did
not fit, for example Type: .tags[1]: expected string, found integer.
KindThe represented JSON kind, without exposing runtime tags.
NullBoolIntegerFloatStringArrayObjectParseErrorMalformed JSON input.
Invalid(string)EncodeErrorA value cannot be represented as JSON text.
Invalid(string)NonFiniteFloatAccessErrorA checked access or mutation failed without changing the value.
WrongKind(Kind, Kind)Expected kind, followed by the actual kind.
IntegerRangeThe integer does not fit the requested signed or unsigned type.
InvalidIndex(i64)The index is negative or exceeds the supported runtime index range.
ValueAn owning JSON value. Assignment and extraction produce independent values. Cleanup is automatic; the representation remains private.
ValueMethodsRead a float without coercing an integer to a float.
Missing keys return None; an explicit null returns Some(value).
Missing elements return None; unsupported indices return InvalidIndex.
Return an independent array of object keys.
Set a string-keyed field, preserving the supplied child.
Append an independent copy of the child.