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, removed, or its wire type/nullability changes (e.g. a sentinel value like "" becoming null); adding a new optional field is not itself a bump.

Structs§

EcosystemToken
Wire-token wrapper for EcosystemId in JSON DTOs.
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.
UpdateItemDocument
One update plan item’s JSON shape.
UpdateReportDocument
Top-level JSON document shape for an update run (FR-021).

Enums§

CooldownFallbackDocument
crate::update::CooldownFallbackNote’s JSON shape (spec 075 FR-013).
OutcomeToken
Wire token for crate::update::Outcome in JSON DTOs.
SeverityToken
Wire token for deps_core::diagnostic::Severity in JSON DTOs.

Constants§

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

Functions§

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