Skip to main content

rama_json/
lib.rs

1//! Streaming JSON tools for Rama.
2//!
3//! This crate is intentionally independent from HTTP. It provides a strict,
4//! incremental JSON tokenizer and JSONPath building/parsing primitives used by
5//! HTTP body layers, TCP stream tools, CLI output selectors, and direct
6//! application code.
7//!
8//! The JSONPath syntax is based on RFC 9535. Rama supports the RFC selectors
9//! that can be matched from a forward streaming value path: member selectors,
10//! non-negative array indexes, non-negative array slices, wildcards, selector
11//! lists, and descendant segments. Filters and negative/end-relative array
12//! selectors are intentionally rejected until a buffered/evaluated mode can
13//! implement their full semantics.
14//!
15//! Rewriting can replace or remove scalar values and whole object/array
16//! subtrees while preserving streaming behavior for the surrounding document.
17
18#![doc(
19    html_favicon_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/rama_logo.svg"
20)]
21#![doc(
22    html_logo_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/rama_logo.svg"
23)]
24#![cfg_attr(docsrs, feature(doc_cfg))]
25
26pub mod capture;
27pub mod path;
28pub mod rewrite;
29pub mod select;
30pub mod tokenizer;
31
32mod error;
33
34pub use error::{JsonError, JsonErrorKind};