title: Deserialize json character as enumeration
body: <p>I have an enumeration defined with C#, where I'm storing it's values as characters, like this:</p>
  
  <pre><code>public enum CardType
  {
      Artist = 'A',
      Contemporary = 'C',
      Historical = 'H',
      Musician = 'M',
      Sports = 'S',
      Writer = 'W'
  }
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>[{"CardType","A"},{"CardType", "C"}]
  </code></pre>
  
  <p>Is it possible to define some kind of converter that will allow me to manually parse the char to the enum value?</p>
  
  <p>I tried creating a JsonConverter, but am not sure how to do it, while applying it only to this property and not the whole parsed object. here's what I tried:</p>
  
  <pre><code>public class EnumerationConverter : JsonConverter
  {
      public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
      {
          serializer.Serialize(writer, value);
      }
  
      public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
      {
          if (reader.TokenType == JsonToken.Null)
          {
              return null;
          }
  
          int value = serializer.Deserialize&lt;int&gt;(reader);
          return (CardType)value;
      }
  
      public override bool CanConvert(Type objectType)
      {
          return objectType.IsSubclassOf(typeof(string));
      }
  }
  </code></pre>
  
  <p>The logic might be wrong and I can fix that but the problem is ReadJson() isn't being called at all.</p>
  
  <p>CanConvert is, but it appears to be called for every property, not just the one property I defined it for:</p>
  
  <pre><code>public class Card
  {
              private CardType type;
          [JsonConverter(typeof(EnumerationConverter))]
          public CardType Type
          {
              get { return type; }
              set { type = value; }
          }
  }
  </code></pre>
  
  <p>I'm sure I've done this incorrectly but am having trouble finding documentation on how to do this for a single field... </p>
  
  <p>What am I missing?</p>