Skip to main content

render_json

Function render_json 

Source
pub fn render_json(report: &ClassificationReport) -> String
Expand description

Renders a classification report as its canonical deterministic JSON mirror.

The field inventory is fixed as schema, verdict, and findings at the top level, and code, path, kind, class, base, submitted, and optional condition for each finding. base and submitted are always present (null when absent). The two-space indentation, field order, report order, and trailing newline are part of the output contract. SCHEMA is the sole version string: changing this inventory requires a schema version bump rather than an in-place field edit. Every string value applies the printable-character escape policy.