pub fn scan(bytes: &[u8], limits: &ParseLimits) -> Result<ScanStats, BoundError>Expand description
Validate bytes as exactly one JSON value within limits.
The length check against max_bytes happens before any byte is examined.
Every other bound is checked incrementally, at the byte where it is first
exceeded. The scan is iterative, so hostile nesting cannot exhaust the
stack.