title: When using newtonsoft json.net to deserialize a string, how do I convert an empty string to null for a nullable int?
body: <p>For example, if I have </p>
  
  <pre><code>public class MyClass
  {
      public Int32? Id { get;set; }
      public string Description { get;set; }
  }
  </code></pre>
  
  <p>and my json string looks like this:</p>
  
  <pre><code>"{\"Id\":\"\",\"Description\":\"test\"}"
  </code></pre>
  
  <p>I get the error <strong>"Could not convert string to integer"</strong></p>