Expand description
rusty_rtos_json — coreJSON remade in Rust.
The validator. JSON_Validate, strict ECMA-404. It agrees with coreJSON
v3.3.1 on all 318 files of JSONTestSuite and passes the suite outright
(95/95 accepted, 188/188 rejected).
The query engine. JSON_SearchConst and JSON_Iterate, diffed against
the C over 2,124 queries and 348 iterations as a 3,089-line trace. A query
returns a sub-slice of the buffer you already have: no tree, no copy.
Zero allocation throughout, no_std, forbid(unsafe), with a no-panic gate
over both halves.
What is not here: a serialiser, which coreJSON does not have either, and
JSON_SearchT, which is a cast of JSON_SearchConst that exists only so C
callers can pass a mutable buffer.
This is the facade: it re-exports the no_std core. Depend on this crate;
reach into the sub-crates only when you are building a port or a backend.
Part of Kairos (Remade With Rust). Plan: docs/plans/rusty_rtos_json.md.
Modules§
- prelude
- The names a firmware wants in scope.
- rtos_
core rusty_rtos_core— the shared vocabulary of the Kairos family.- search
JSON_SearchConstandJSON_Iterate: query a document in place.JSON_SearchConstandJSON_Iterate: the query half of coreJSON.- validate
JSON_Validate: coreJSON’s strict ECMA-404 validator.JSON_Validate: coreJSON’s strict ECMA-404 validator, over a byte slice.
Structs§
- Match
- A value found by
search. - Pair
- One key-value pair, or one array element, from
iterate. - Pairs
- The elements of a collection, as a Rust iterator.
Enums§
- Kind
JSONTypes_t, for the types a found value can actually have.- NotFound
- Why a
searchfound nothing. - Stopped
- Why an
iteratestopped. - Validity
JSONStatus_t, for the subsetvalidatecan answer with.
Constants§
- MAX_
DEPTH JSON_MAX_DEPTH. The C’s default, and the reason there is no recursion.- VERSION
- Crate version, for manifests and logs.
Functions§
- is_
valid - Whether
validateaccepts this document. - iterate
JSON_Iterate: the next element of a collection, carrying its own cursor.- pairs
- Iterate the elements of a collection. See
Pairs. - search
JSON_SearchConst: find a value by a dotted, bracketed path.- validate
JSON_Validate: is this a complete, valid JSON document?