Implement encode method in Attribute
An empty set is possible for the default value