According to EnumMemberAttribute Class
], this attribute is defined as:
[AttributeUsage(AttributeTargets.Field, AllowMultiple=false, Inherited=false)]
public sealed class EnumMemberAttribute : Attribute
This means that you cannot match several names to the same enumeration value.
What you can do is provide a method which will return a
value from a string:
public static PrimaryColour GetColour(string value)
Then, during the deserialization process, hook it to assign a correct value from json (this part depends on the way the json deserialization is handled, which I have no knowledge of at the moment).
Hope this helps.