@classmethod
def to_data(cls, obj):
    """Convert all attribute values for optimal dumping to YAML."""
    value = cls.to_value(obj)
    data = []
    for item in sorted(value):
        data.append(cls.item_type.to_data(item))
    return data
