title: Replace "null" to "0" in json only for int or use Nullable<int>?
body: <p>I'll try to describe my situation:</p>
  
  <p>I have Windows Store App (C#), which receive data from remote data base (<code>DataBase1</code>), and store it in local database in isolated storage (<code>DataBase2</code>). I have single class for all manipulation with data for ex:</p>
  
  <pre><code>[Table("Table")]
  [DataContract]
  public class Class1
  {
      [PrimaryKey]
      [Column("id")]
      [DataMember(Name = "id")]
      public int Id { get; set; } 
  }
  </code></pre>
  
  <p>This class can take 50+ fields.<br>
  I use <a href="http://json.codeplex.com/" rel="nofollow">Newtonsoft.Json</a>:</p>
  
  <pre><code> var class = JsonConvert.DeserializeObjectAsync&lt;Class1&gt;(json);
  </code></pre>
  
  <p>All works great, but in <code>DataBase1</code> all fields have <code>default value = null</code>, and when I receive null I have exception. </p>
  
  <p>I have 2 ideas how to solve it:
  
  <ol>
  <li>make <code>int Id</code> -> <code>int? Id</code>, and in setter change "null" to "0" (and always work with nulleable type), but I'm not sure about performance.</li>
  <li>make another nullable field (<code>int? IdCanBeNull</code>), where store value from DataBase1, then in <code>IdCanBeNull</code>s setter set nested value to <code>Id</code> and always work with <code>int Id</code> (not nullable type) (save it in <code>DataBase2</code> and other). Better performance, but need to create 2xNumberOfFields</li>
  </ol>
  
  <p>My questions is:<br> Which is right way?<br> May be you have another idea, how to store "null" to "0" with using <code>Newtonsoft.Json</code>.<br> Try to explain your answer.</p>
  
  <p>Note: </p>
  
  <ol>
  <li>Yes, when I receive json I can remove all "null" to "0" - but it's isn't good solution.</li>
  <li>I can't change default value of <code>DataBase1</code>.</li>
  </ol>