toJson method
Implementation
Map<String, dynamic> toJson() => {
'timeUnixNano': timeUnixNano,
if (observedTimeUnixNano != null)
'observedTimeUnixNano': observedTimeUnixNano,
'severityNumber': _sevToJson(severity),
if (severityText != null) 'severityText': severityText,
'body': _wrapValue(body),
if (attributes.isNotEmpty)
'attributes': attributes.map((a) => a.toJson()).toList(),
};