toJson method

Map<String, dynamic> toJson()

Serialises this report to the JSON payload consumed by the VS Code extension.

Implementation

Map<String, dynamic> toJson() => {
  'targetPath': targetPath,
  'summary': {
    'totalDiagnostics': totalDiagnostics,
    'architectureDiagnosticCount': architectureDiagnosticCount,
    'governanceDiagnosticCount': governanceDiagnosticCount,
  },
  'diagnostics': diagnostics
      .map((diagnostic) => diagnostic.toJson())
      .toList(),
};