title: Enum deserialization with Newtonsoft.Json
body: <p>Hello I want to deserialize a class and in this class is a enum value:</p>
  <pre><code>[JsonConverter(typeof(StringEnumConverter))]
  public enum MessageType {
      Verify, 
      Disconnect,
  }
  
  [Serializable]
  public class SocketMessage {
      public Dictionary&lt;String, String&gt; Header { get; private set; }
      public MessageType MessageType { get; private set; }
  
      public SocketMessage(MessageType type) {
          Header = new Dictionary&lt;String, String&gt;();
          MessageType = type;
      }
  
      public void AddHeaderData(String key, String data) {
          Header.Add(key, data);
      }
  
      public byte[] ToJSONBytes() {
          String json = JsonConvert.SerializeObject(this);
          return Encoding.UTF8.GetBytes(json);
      }
  
      public static SocketMessage FromJSONBytes(byte[] json) {
          String s = Encoding.UTF8.GetString(json);
          return JsonConvert.DeserializeObject&lt;SocketMessage&gt;(s);
      }
  }
  </code></pre>
  <p>The dictionary will be correctly deserialized but the enum always get his default value &gt;verify&lt; the json looks like this: {&quot;Header&quot;:{&quot;Test&quot;:&quot;Test&quot;},&quot;MessageType&quot;:&quot;Disconnect&quot;}</p>
  <p>I really don't understand why it happens</p>
  <p>I appreciate any help!</p>