@override Map<String, dynamic> toJson() => { 'type': type.index, 'content': (content is Serializable) ? content.toJson() : content, };