Converts the object to a JSON representation.
Returns the JSON representation of the object.
@override String toJson() => name;