toJson method
Implementation
Map<String, Object?> toJson() => {
'code': code,
'stage': stage,
'severity': severity.name,
'owner': owner.name,
'message': message,
if (remediation.isNotEmpty) 'remediation': remediation,
if (profile != null) 'profile': profile,
if (runnerId != null) 'runnerId': runnerId,
if (context.isNotEmpty) 'context': Map<String, String>.from(context),
};