skip to Main Content

Json conversion of enums to strings

I have the following class: using Newtonsoft.Json; using Newtonsoft.Json.Converters; public class JsonError { [JsonConverter(typeof(StringEnumConverter))] public enum Number { [EnumMember(Value = "0")] Pass, [EnumMember(Value = "1")] Miscalc, [EnumMember(Value = "2")] ReadError } public Number ErrorNumber { get; set; } } And…

VIEW QUESTION
Back To Top
Search