I\'ve got the following model:
public enum Status
{
[Display(Name = \"Awaiting Approval\")]
AwaitingApproval,
Rejected,
Accepted,
}
You should try using [EnumMember]
instead of [Display]
. You can also put the [JsonConverter]
attribute on the enum itself.
[JsonConverter(typeof(StringEnumConverter))]
public enum Status
{
[EnumMember(Value = "Awaiting Approval")]
AwaitingApproval,
Rejected,
Accepted,
}
The VB.NET version for the JsonConverter attribute is: