Skip to main content

Module json_read

Module json_read 

Source
Expand description

A minimal JSON READER — the other half of crate::json, for the one place amont must read JSON it did not write: npm’s lockfiles, to tell whether the installed tree a tree gate would lint with is the locked one (ADR-0024). Dependency-free for the same reason json.rs is.

Recursive descent over the RFC 8259 grammar. Numbers are kept as text: nothing here does arithmetic on them. Depth is bounded, so a hostile file cannot overflow the stack; a parse error is None, which every caller reads as “cannot tell”, the fail-closed answer.

Enums§

Value

Functions§

parse