title: Why are all the collections in my POCO are null when deserializing some valid json with the .NET Newtonsoft.Json component
body: <h3>Problem</h3>
  <p>When trying to deserialize some Json using Newtonsoft's Json.NET nuget library my collection-properties are null when I do NOT provide a <code>JsonSerializerSettings</code> - why?</p>
  <h3>Details</h3>
  <p>I have some valid json data and deserializing it into my custom class / POCO. Now, all the simple properties (like <code>string</code>s, <code>int</code>'s, etc) all get set correctly. My simple child classes also get set properly (eg. a <code>User</code> property or a <code>BuildingDetails</code> property, etc).</p>
  <p>All my collections are <code>null</code>, though. The setters are never called (I've put a break point in there and they don't get set, but the others do get called/set).</p>
  <p>eg. property.</p>
  <pre><code>List&lt;Media&gt; Images { get { ... } set { ... } }
  </code></pre>
  <p>eg.</p>
  <pre><code>var foo = new Foo();
  var json = JsonConvert.Serialize(foo);
  var anotherFoo = JsonConvert.Deserialize&lt;Foo&gt;(json);
  
  // the collection properties on anotherFoo are null
  </code></pre>
  <p>Now - this is the crazy thing: when I use a <code>JsonSerializerSettings</code> it now works:</p>
  <pre><code>// NOTE: ModifiedDataContractResolver &lt;-- skips any property that is a type
  /        ModifiedData (which is a simple custom class I have).
  var settings = new JsonSerializerSettings
  {
      ContractResolver = new ModifiedDataContractResolver(),
      ObjectCreationHandling = ObjectCreationHandling.Replace,
      Formatting = Formatting.Indented
  };
  
  var foo = new Foo();
  var json = JsonConvert.Serialize(foo, settings);
  var anotherFoo = JsonConvert.Deserialize&lt;Foo&gt;(json, settings);
  </code></pre>
  <p>my collections are now set!</p>
  <p>Take note of this: <code>ObjectCreationHandling = ObjectCreationHandling.Replace</code>. This is the magical setting that makes things work.</p>
  <p><strong>What is this doing and why does <em>not</em> having this setting mean my collections are not getting set/created/etc?</strong></p>
  <p>Another clue. If I do <em>not</em> have the setter, collection is null / not set. If I have the setter like this, it fails too:</p>
  <pre><code>public List&lt;Media&gt; Images
  {
      get { return new List&lt;Media&gt; { new Media{..}, new Media{..} }; }
     set { AddImages(value); }
  }
  </code></pre>
  <p>If I do NOT return the list, in the <code>getter</code> the collection is SET! IT WORKS!</p>
  <pre><code>private List&lt;Media&gt; _images;
  public List&lt;Media&gt; Images
  {
      get { return _images; }
      set { AddImages(value); }
  }
  </code></pre>
  <p>Notice how it's now just using a baking field instead?</p>
  <p>It's like there's some weird connection/correlation between the collection's GETTER property and result and how Json.net sets this data using the <code>auto</code> setting?</p>