Skip to main content

Module json

Module json 

Source
Expand description

Versioned JSON output (FR-007).

Schema mirrors specs/062-cli-check-mode/plan.md §4 exactly. schema_version lets downstream tooling detect a future breaking change to this shape (constitution principle 8) — bump it, and document the bump in CHANGELOG.md as Breaking, whenever a field is renamed or removed (adding a new optional field is not itself a bump).

Structs§

FindingDocument
One finding’s JSON shape.
PositionDocument
LSP Position’s JSON shape ({"line": ..., "character": ...}), both zero-based.
RangeDocument
LSP Range’s JSON shape ({"start": {...}, "end": {...}}).
ReportDocument
Top-level JSON document shape.

Constants§

SCHEMA_VERSION
The current schema_version this module emits and ReportDocument can deserialize.

Functions§

render
Renders report as a pretty-printed JSON string.
to_document
Builds the versioned ReportDocument for report.