toJson method

Map<String, dynamic> toJson()

Public method or function.

Implementation

Map<String, dynamic> toJson() => {
  'projectName': projectName,
  'projectPath': projectPath,
  'totalChecks': totalChecks,
  'totalExpected': totalExpected,
  'totalActual': totalActual,
  'truePositives': truePositives.map((e) => e.toJson()).toList(),
  'falseNegatives': falseNegatives.map((e) => e.toJson()).toList(),
  'falsePositives': falsePositives
      .map(
        (i) => {
          'code': i.code,
          'title': i.title,
          'severity': i.severity.name,
          'analyzerName': i.code.substring(0, 2),
        },
      )
      .toList(),
  'accuracy': accuracy,
  'precision': precision,
  'recall': recall,
};