toJson method

Map<String, Object?> toJson()

Encodes this CockpitTestError as a JSON object.

Implementation

Map<String, Object?> toJson() => <String, Object?>{
  'code': code.name,
  'message': message,
  if (path != null) 'path': path,
  if (stepId != null) 'stepId': stepId,
  if (location != null) 'location': location!.toJson(),
  if (details.isNotEmpty) 'details': details,
};