Skip to main content

Module json

Module json 

Source
Expand description

A minimal JSON emitter for amont list --json.

Twenty lines for a flat, known schema — not a general serialiser. See manifest.rs’s module doc for why this project prefers that trade on the commit path: this crate must stay dependency-free, and a hand-rolled escaper for the one shape CheckListing needs costs less than a serde tree that runs on every commit in 96 repositories.

Functions§

array
Comma-join already-built objects into [...].
bool_field
escape
Escape s per the JSON spec: ", \, and control characters.
int_field
A number, unquoted — a limit a reader will compare against is worth emitting as one rather than as a string they have to parse back.
object
Comma-join already-built "key":value fragments into {...}.
opt_string_field
null when value is None — used for stage_filter and command.
string_array_field
string_field