title: How to prevent Json.NET converting enum to string?
body: <p>The following class</p>
  
  <pre><code>public class RequestSections : RequestBase
  {
      public RequestSections(Command c, Dictionary&lt;SectionIdentifier, BigInteger&gt; v) : base(c)
      {
          VERSIONS = v;
      }
  
      public Dictionary&lt;SectionIdentifier, BigInteger&gt; VERSIONS { get; set; }
  }
  </code></pre>
  
  <p>is serialized to JSON using JSON.NET and producing the following JSON output:</p>
  
  <pre><code>{
    "VERSIONS": {
      "Photos": 901,
      "Music": 902
    },
    "CMD": 43
  }
  </code></pre>
  
  <p>The problem is that <code>SectionIdentifier</code> is <code>enum</code> but JSON.NET converts them to string. </p>
  
  <pre><code>public enum SectionIdentifier
  {
      Photos = 1000,
      Music
  }
  </code></pre>
  
  <p>How can I prevent JSON.NET converting integer <code>enum</code> values to string? I would like to see their integer representations only.</p>
  
  <p>By the way, <code>CMD</code> which is residing in <code>RequestBase</code> class is also <code>enum</code> type, but somehow luckily it is not converted to string.</p>