use super::{Diagnostic, DiagnosticFormatter};
pub struct JsonFormatter;
impl DiagnosticFormatter for JsonFormatter {
fn format(&self, diagnostics: &[Diagnostic], _source: Option<&str>) -> String {
serde_json::to_string(diagnostics).unwrap_or_else(|_| "[]".to_string())
}
}