pub fn format_json_diagnostic_structured(
level: &str,
what: &str,
why: Option<&str>,
hint: Option<&str>,
) -> StringExpand description
Format a structured diagnostic as a JSON object for stderr.
Always emits all four fields {"level","what","why","hint"} so that
consumers can rely on a fixed schema. Missing values are null.