Expand description
Bounded JSON: resource limits checked on raw bytes before typed parsing.
scan validates that a byte slice is exactly one RFC 8259 JSON value and
that it stays within every ParseLimits bound, without recursion and
without building any value. parse_bounded runs typed deserialization
only after the scan accepts.
Reading bytes from a socket, file or other transport is the caller’s
responsibility: this module judges a slice already in memory, so the
transport must bound its own buffering (for example at max_bytes).
Structs§
- Parse
Limits - Resource bounds for one JSON document. There is no default: every caller states its limits.
- Scan
Stats - What an accepted scan observed.
Enums§
- Bound
Error - Why a scan refused its input. Offsets are byte offsets into the input.
- Parse
Error - Why
parse_boundedproduced no value.
Functions§
- parse_
bounded - Scan
bytes, then deserialize them intoT. - scan
- Validate
bytesas exactly one JSON value withinlimits.