title: JSON.NET Deserialization: Ignore Properties When Types Do Not Match
body: <p>Here is the issue that I am trying to resolve. I have two <em>different classes</em> which I have <em>no ownership of</em>, and for most properties, if the names match, then the types match as well.  The only properties that I care about are the ones where the name and type match, missing properties or properties with mismatched types can all be ignored.</p>
  
  <p>My work around was to do this:</p>
  
  <pre><code>var settings = new JsonSerializerSettings
  {
       MissingMemberHandling = MissingMemberHandling.Ignore,
       Error = (sender, eventArgs) =&gt; eventArgs.ErrorContext.Handled = true
  };
  </code></pre>
  
  <p>but I feel that this may be a bit too heavy handed, and could end up biting me later due to the fact it ignores all errors.</p>
  
  <p><strong>Is there a more elegant way that exclusively targets errors when the property types do not match?</strong></p>