Converts the object to a JSON-serializable value.
@override Map<String, dynamic> toJson() { return {'options': options, if (required != null) 'required': required}; }