Serialize to a JSON-encodable map, omitting absent members.
Map<String, dynamic> toJson() => <String, dynamic>{ 'key': key, 'reason': reason, };