title: json data gives null reference exception after deserialization
body: <p>I want to deserialize json data in asp.net c# code. I am receiving nullreference exception in the deserializing statement:</p>
  
  <pre><code>   public static string saveAllTreatments(string jsonval)
          {
              var output =JsonConvert.DeserializeObject&lt;Treatments&gt;(jsonval);
              Treatments tr = (Treatments)output;
              foreach (var item in tr.data)
              {
                  Console.WriteLine("date: {0}, number: {1}, name: {2}, note: {3}",item.date, item.number, item.name,item.note);
              }
  }
  </code></pre>
  
  <p>here is my class:</p>
  
  <pre><code>public class Treatment
      {
          public DateTime date{ get; set; }
          public int number{ get; set; }
          public string name{ get; set; }
          public string note { get; set; }
      }
      public class Treatments {
          public List&lt;Treatment&gt; data { get; set; }
  
      }
  </code></pre>
  
  <p>and this is my json:</p>
  
  <pre><code>{"treatment":[{"date":"09.07.2015","number":"22","name":"Jackson","note":"bla"}]}
  </code></pre>
  
  <p>I see jsonval has json data (its not null has string json data), I receive null reference exception when deserializing to output. Why is this happening?</p>
  
  <p>Thanks.</p>