pub fn report_to_json(path: Option<&str>, report: &CheckReport) -> ValueExpand description
Per-file object of the surf-lint JSON envelope.
path is the file label; pass None for in-memory input (e.g. the wasm
check_json export) and the path key is omitted entirely. Diagnostics
are the Diagnostic serde serialization verbatim: spans carry line
numbers and byte offsets, fix payloads (description, safety, edits) ride
along when present, and span/code/fix keys are omitted when None.