pub fn parse(text: &str, limits: &Limits) -> Result<Json, DecodeError>Expand description
Reads one JSON value from text, refusing anything after it but
whitespace.
Arrays and objects may nest limits.json_depth() deep. A number is held
to the limits by its value, not its spelling, and is measured before
anything as large as its value is built: its significant digits must
make an integer within limits.int_bits, and it may take no more than
limits.text_bytes characters in plain notation. Written out, the
numbers of one text together may grow it by no more than
limits.text_bytes characters, so the canonical text of what is read is
never longer than text and that limit together, however its numbers
were spelled.
ยงErrors
A DecodeError when text is not one JSON value, or passes any of
the bounds above.