title: "Value cannot be null" error when deserializing json using C# / JavaScriptSerializer
body: <p>I am trying to deserialize some JSON that I am grabbing from an asmx service into a list of objects.  All of the fields in the class match fields in the JSON, the JSON is coming back valid, but I get the seemingly cryptic error:</p>
  
  <blockquote>
    <p>Value cannot be null. Parameter name: type.</p>
  </blockquote>
  
  <p>There is no parameter named type in any of my objects.  Has anyone seen this before? </p>
  
  <p>Here is the code that is throwing the error.</p>
  
  <pre><code>System.Web.Script.Serialization.JavaScriptSerializer serr = new System.Web.Script.Serialization.JavaScriptSerializer();
  List&lt;Rejection&gt; l = serr.Deserialize&lt;List&lt;Rejection&gt;&gt;(json);
  </code></pre>
  
  <p>json is a string declared earlier and coming back with valid json that matches the field in my class.  Does the class you are deserializing to's name have to match what is in the __type attribute in the json?</p>