LogRecord.fromJson constructor
Implementation
factory LogRecord.fromJson(Map<String, dynamic> j) => LogRecord(
timeUnixNano: int.parse(j['timeUnixNano'].toString()),
observedTimeUnixNano: j['observedTimeUnixNano'] != null
? int.parse(j['observedTimeUnixNano'].toString())
: null,
severity: _sevFromJson(j['severityNumber']),
severityText: j['severityText'],
body: _unwrapValue(j['body'] as Map<String, dynamic>),
attributes: (j['attributes'] as List<dynamic>? ?? [])
.cast<Map<String, dynamic>>()
.map(Attribute.fromJson)
.toList(),
);