Converts a MarkDef to a JSON map. Should be implemented by subclasses.
factory MarkDef.fromJson(Map<String, dynamic> json) => throw UnsupportedError('This should be implemented by the subclass.');