toJson method

Map<String, Object?> toJson()

Encodes this value as a JSON object.

Implementation

Map<String, Object?> toJson() => <String, Object?>{
  'code': code,
  if (notice != null) 'notice': notice!,
  if (details.isNotEmpty) 'details': _wireJsonObject(details, r'$.details'),
};