json::read
Pull tokenizer and parser. The tokenizer reads a window of the input
(all of it for a str, chunks for a reader) and yields Events,
checking the grammar as it goes; parse builds a Value from them.
Structs
TokenizerSource
pub struct TokenizerA JSON reader yielding Events. new reads a string; from_reader
reads any io::Read in 64 KiB chunks and keeps only the unread part
of the current chunk, so memory stays flat for large inputs.
Nesting limit; deeper input is an error.
Read
s.Read
rto its end.Nesting depth after the last event.
(line, col)where the last event's token starts.The next event. After
Endit keeps returningEnd.
Enums
EventSource
pub enum EventOne step of a document, in order. Every BeginObject / BeginArray
is matched by its End*; inside an object each value follows its
Key. End comes once, after the top-level value.
Functions
parse_withSource
pub fn parse_with(t: Tokenizer) throws (JsonError) -> Value Read one document into a Value.
locateSource
pub fn locate(s: str, e: JsonError) -> JsonError e (from decoding s) with the line:col of the value or key at
e.path (a JSON Pointer).
Constants
MAX_DEPTHSource
pub const MAX_DEPTH: usize = 128Nesting limit of parse / from_str / Tokenizer::new.