Skip to main content

render_json

Function render_json 

Source
pub fn render_json(map: &SourceMap, diagnostic: &Diagnostic) -> String
Expand description

Renders a diagnostic as a single line of JSON, for tools.

Written by hand so the compiler has no dependencies while it is this small. If the shape grows past what is comfortable here, reach for a real serializer rather than making this cleverer.