pub fn parse_lenient_with(input: &str, config: &LenientConfig) -> ParseResultExpand description
Parse input with caller-supplied recovery knobs.
See the module docs for the recovery strategy.
Strips a leading UTF-8 BOM (U+FEFF) — Windows editors emit
one by default and recovery is the one entry point callers
expect to absorb it.
Hostile ----spam inputs are rejected at
ParserConfig::max_documents: the boundary scanner probes
one document beyond the cap instead of returning a truncated stream.
Per-document parsing then re-enforces every other
ParserConfig limit (max_depth, max_events,
max_document_length, …).