title: How to ignore type while Deserialization using Newtonsoft.Json
body: <p>I am trying to Deserialize json data which i have to with respect to model class i have </p>
  
  <p><strong>Json :</strong></p>
  
  <pre><code>"{'test':'1339886'}"
  </code></pre>
  
  <p><strong>Classes :</strong></p>
  
  <pre><code>public class NewtonTest
      {
          public Element test { get; set; }
      }
  public class Element
      {
          public string sample { get; set; }
      }
  </code></pre>
  
  <p><strong>In Main class :</strong></p>
  
  <pre><code>//under Main
  string jsonData =  "{'test':'1339886'}";
  var  = JsonConvert.DeserializeObject&lt;NewtonTest&gt;(jsonData);
  </code></pre>
  
  <p><strong>Error Info :</strong> //innner exception</p>
  
  <p><em>Could not cast or convert from System.String to Test.Element."</em> </p>
  
  <p>I am completely aware of what the error states as i am passing <code>string</code> in my <code>json</code> where as in class i have a <code>class</code> as type(mismatch happening) .</p>
  
  <p>In such cases i need to handle the error and maybe place a null if there is mismatch in output but it should not throw exception .</p>
  
  <p>I tried my best reading the docs and setting options via <a href="http://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_JsonSerializerSettings.htm" rel="noreferrer"><strong>settings</strong></a> but none seem to work .</p>
  
  <p>I am using version 4.5 of Newtonsoft.Json</p>