toJson method
Implementation
@override
Map<String, dynamic> toJson() => {
'type': 'system',
'uuid': uuid,
'timestamp': timestamp,
'subtype': subtype.name,
'level': level.name,
'content': content,
if (metadata != null) 'metadata': metadata,
};