Deserialize json character as enumeration
问题 I have an enumeration defined with C#, where I'm storing it's values as characters, like this: public enum CardType { Artist = 'A', Contemporary = 'C', Historical = 'H', Musician = 'M', Sports = 'S', Writer = 'W' } I'm attempting to deserialize using JSON.NET, but the incoming JSON was written using the CHAR value (string) instead of the int value of the enumeration, like this: [{"CardType","A"},{"CardType", "C"}] Is it possible to define some kind of converter that will allow me to manually