title: Sometimes yes and sometimes not JSON error: "No parameterless constructor defined for type of 'System.String'"
body: <p>Here's my code:</p>
  
  <pre><code>JavaScriptSerializer serializer = new JavaScriptSerializer();
  Dictionary&lt;string, string&gt; responseVals = serializer.Deserialize&lt;Dictionary&lt;string, string&gt;&gt;(response);
  </code></pre>
  
  <p>When <code>response</code> is</p>
  
  <pre><code>{
    "status": 21007
  }
  </code></pre>
  
  <p>it works.</p>
  
  <p>When <code>response</code> is</p>
  
  <pre><code>{
    "receipt": {
      "receipt_type": "ProductionSandbox",
      "adam_id": 0,
      "app_item_id": 0,
      "bundle_id": "...",
      "application_version": "1.0",
      "download_id": 0,
      "version_external_identifier": 0,
      "receipt_creation_date": "...",
      "receipt_creation_date_ms": "...",
      "receipt_creation_date_pst": "...",
      "request_date": "...",
      "request_date_ms": "...",
      "request_date_pst": "...",
      "original_purchase_date": "...",
      "original_purchase_date_ms": "...",
      "original_purchase_date_pst": "...",
      "original_application_version": "1.0",
      "in_app": [
        {
          "quantity": "1",
          "product_id": "...",
          "transaction_id": "...",
          "original_transaction_id": "...",
          "purchase_date": "...",
          "purchase_date_ms": "...",
          "purchase_date_pst": "...",
          "original_purchase_date": "...",
          "original_purchase_date_ms": "..",
          "original_purchase_date_pst": "...",
          "is_trial_period": "false"
        }
      ]
    },
    "status": 0,
    "environment": "Sandbox"
  }
  </code></pre>
  
  <p>I get an error:</p>
  
  <blockquote>
    <p>No parameterless constructor defined for type of 'System.String'</p>
  </blockquote>
  
  <p>Why the difference?</p>
  
  <p>This is in a web service (Asp.net) verifying an iOS in app purchase (in sandbox). Perhaps this matters.</p>