Crate json
Expand description
Streaming JSON tools for Rama.
This crate is intentionally independent from HTTP. It provides a strict, incremental JSON tokenizer and JSONPath building/parsing primitives used by HTTP body layers, TCP stream tools, CLI output selectors, and direct application code.
The JSONPath syntax is based on RFC 9535. Rama supports the RFC selectors that can be matched from a forward streaming value path: member selectors, non-negative array indexes, non-negative array slices, wildcards, selector lists, and descendant segments. Filters and negative/end-relative array selectors are intentionally rejected until a buffered/evaluated mode can implement their full semantics.
Rewriting can replace or remove scalar values and whole object/array subtrees while preserving streaming behavior for the surrounding document.
Modules§
- capture
- Streaming JSON value capture.
- path
- JSONPath parsing and typed construction.
- rewrite
- Streaming JSON rewriting.
- select
- Streaming JSONPath token selection.
- tokenizer
- Strict incremental JSON tokenizer.
Structs§
- Json
Error - Error produced while parsing, selecting, or rewriting JSON.
Enums§
- Json
Error Kind - Reason for a JSON failure.