toJson method
Implementation
Map<String, dynamic> toJson() => {
'primaryError': primaryError,
if (targetPackage != null) 'targetPackage': targetPackage,
if (targetFile != null) 'targetFile': targetFile,
'items': items.map((i) => i.toJson()).toList(),
if (failedTestRecord != null)
'failedTestRecord': failedTestRecord!.toJson(),
if (historicalReportCitations.isNotEmpty)
'historicalReportCitations': historicalReportCitations,
};