title: Populate object where objects are reused and arrays are replaced?
body: <p>Using Json.NET, I'd like to map a <code>JObject</code> onto a .NET object with the following behavior:</p>
  
  <ol>
  <li><p>For (non-null) array properties of the <code>JObject</code>, replace the <em>entire</em> collection on the target object.</p></li>
  <li><p>For (non-null) object properties of the <code>JObject</code>, reuse the target object's property if it's not null, and map just the provided properties onto it.</p></li>
  </ol>
  
  <p><a href="http://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_JsonSerializer_Populate.htm" rel="nofollow noreferrer">JsonSerializer.Populate</a> seems to be what I want, as described in <a href="https://stackoverflow.com/a/30220811/62600">this answer</a>. As for the behaviors I'm looking for, it seems I can achieve one or the other, but not both, via <a href="http://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_ObjectCreationHandling.htm" rel="nofollow noreferrer">JsonSerializerSettings.ObjectCreationHandling</a>. <code>ObjectCreationHandling.Replace</code> does what I want with respect to requirement #1, while <code>ObjectCreationHandling.Auto</code> does what I want with respect to requirement #2, but it appends array items onto the existing collection.</p>
  
  <p>What is the recommended way to achieve both requirements here?</p>