title: A first chance exception of type 'Newtonsoft.Json.JsonReaderException' occurred while convert partial json to c# object
body: <p>So, here I have <code>JsonResult jr</code>, it looks like this(the output is one single line, I format it here):</p>
  
  <pre><code>string jr = {"Results":
      [
        {"Code":"DEMO",
         "Id":"1285",
         "Office":"9881",
         "Customers":
             [
               2713,
               94204
             ],
         "Account":196,
         "Appointments":
             [
               14,
               58
             ],
         "Role":0,
         "UserName":"demo",
         "UserId":3669,
         "FirstName":"Peter",
         "LastName":"Pan",
         "Phones":
             [
               "(888) 888-8888"
             ],
         "Fax":null,
         "Email":"test@test.com",
         "SMS":null,
         "RecordStatus":"1"},
  
  
        {"Code":"DEMO",
         "Id":"9292",
         "Office":"9881",
         "Customers":
             [
               13,
               904
             ],
         "Account":196,
         "Appointments":
             [
               14,
               58
             ],
         "Role":0,
         "UserName":"berry",
         "UserId":302,
         "FirstName":"Jimmy",
         "LastName":"White",
         "Phones":
             [
               "(888) 888-8888"
             ],
         "Email":"test@test.com",
         "SMS":null,
         "RecordStatus":"1"}
       ],
  "TotalResults":2,
  "MilliSeconds":4}
  </code></pre>
  
  <p>Here is my object <code>User</code>:</p>
  
  <pre><code>public class User
  {
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string Id { get; set; }
      public string Office { get; set; }
      public string Email { get; set; }
      public string Code { get; set; }
  }
  </code></pre>
  
  <p>I'm trying to use Deserializing Partial JSON Fragments to map the json to my object: 
  <a href="http://www.newtonsoft.com/json/help/html/SerializingJSONFragments.htm" rel="nofollow">http://www.newtonsoft.com/json/help/html/SerializingJSONFragments.htm</a></p>
  
  <p>I followed the example, but I got an error: <strong>A first chance exception of type 'Newtonsoft.Json.JsonReaderException' occured in Newtonsoft.Json.dll</strong>.</p>
  
  <p>Many people online saying it's caused by bad json. I checked mine, didn't find anything wrong by myself. Below is my code:</p>
  
  <pre><code>JObject response = JObject.Parse(jr);
  IList&lt;JToken&gt; results = response["Results"].Children().ToList();
  
  IList&lt;User&gt; searchResults = new List&lt;User&gt;();
  foreach(JToken result in results)
  {
      System.Diagnostics.Debug.WriteLine(result); //just to check my json data.
      User searchResult = JsonConvert.DeserializeObject&lt;User&gt;(results.ToString()); //get exception on this line.
      searchResults.Add(searchResult);
  }
  </code></pre>
  
  <p>The first <code>result</code> output looks like this:</p>
  
  <pre><code>{
         "Code":"DEMO",
         "Id":"1285",
         "Office":"9881",
         "Customers":
             [
               2713,
               94204
             ],
         "Account":196,
         "Appointments":
             [
               14,
               58
             ],
         "Role":0,
         "UserName":"demo",
         "UserId":3669,
         "FirstName":"Peter",
         "LastName":"Pan",
         "Phones":
             [
               "(888) 888-8888"
             ],
         "Fax":null,
         "Email":"test@test.com",
         "SMS":null,
         "RecordStatus":"1"
  }
  </code></pre>
  
  <p>Not sure why this exception happens, wondering how to fix it..</p>