toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'violationType': violationType.toJson(),
if (request != null) 'request': request!.toJson(),
if (violatingNodeId != null) 'violatingNodeId': violatingNodeId!.toJson(),
if (invalidParameter != null) 'invalidParameter': invalidParameter,
};
}