title: Load JSON data stream from text file into objects C#
body: <p>I'm using <a href="http://james.newtonking.com/pages/json-net.aspx" rel="nofollow">Newtonsoft.Json.Linq</a> and I'd like to load the data into objects (or structs) that I define and put the objects into a list or collection.</p>
  
  <p>Currently I'm pulling out the JSON properties with indexes to the names.</p>
  
  <pre><code>filename = openFileDialog1.FileName;
  
  StreamReader re = File.OpenText(filename);
  JsonTextReader reader = new JsonTextReader(re);
  string ct = "";
  
  JArray root = JArray.Load(reader);
  foreach (JObject o in root)
  {
      ct += "\r\nHACCstudentBlogs.Add(\"" + (string)o["fullName"] + "\",\"\");";
  }
  namesText.Text = ct;
  </code></pre>
  
  <p>The object is defined as follows, and sometimes the JSON won't contain a value for a property:</p>
  
  <pre><code>class blogEntry
  {
      public string ID { get; set; }
      public string ContributorName { get; set; }
      public string Title { get; set; }
      public string Description { get; set; }
      public string CreatedDate { get; set; }
  }
  </code></pre>