title: Parsing JSON API in C#
body: <p>so I'm fairly new to programming but am looking to go much deeper with it.  I recently started to get involved in a project to create a WinForm program for a website that uses an API system in JSON.</p>
  <p>I've never used an API before so I'm not quite sure how it works  but after looking at it for a few minutes I seem to have the gist of it.  What I don't get is how exactly parsing JSON in C# works.</p>
  <p>I found
  <a href="http://www.masnun.me/2011/07/08/quick-json-parsing-with-c-sharp.html" rel="noreferrer">this link </a>after a little google searching.  And I got it working (somewhat) with this code.</p>
  <pre><code>static void Main(string[] args)
  {
          WebClient c = new WebClient();
          var vLogin = c.DownloadString(&quot;https://www.openraid.us/index.php/api/login/username/password&quot;);
          //Returns string 
          //{&quot;status&quot;:1,&quot;error&quot;:null,&quot;token&quot;:&quot;250-1336515541-c48d354d96e06d488d1a2530071ef07c9532da26&quot;} 
          //Token = random, no decisive length*/
          JObject o = JObject.Parse(vLogin);
          Console.WriteLine(&quot;Login Status: &quot; + o[&quot;status&quot;]);
          String sToken = &quot;&quot; + o[&quot;token&quot;];
          Console.WriteLine(sToken);
          Console.WriteLine(&quot;&quot;);
          //Breaks after this
          var myRaids = c.DownloadString(&quot;https://www.openraid.us/index.php/api/myraids/&quot;+sToken);
          JObject r = JObject.Parse(myRaids); //error occurs here
          String sEventId = &quot;&quot; + r[&quot;event_id&quot;];
          Console.WriteLine(&quot;Event ID: &quot; + sEventId);
          Console.ReadLine();
  }
  </code></pre>
  <p>So to me it looks like I have parsing 1 page done and handled, but when I move onto the second I get this error.</p>
  <blockquote>
  <p>Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1.</p>
  </blockquote>
  <p>So I guess my question is, how do I parse more than 1 page or call of JSON and what would be the easiest way to break up each section of the JSON object (Such as <code>status</code>, <code>error</code>, and <code>token</code>, into C# strings?</p>