title: Unexpected character encountered while parsing value:
body: <p>I'm trying to use Steam's Web API to receive JSON and parse it using JSON.Net. I'm simply hard-coding a URL where I know I'll receive JSON. I'm running into the following error when I run it though:</p>
  
  <blockquote>
    <p>Unexpected character encountered while parsing value: . Path '', line
    0, position 0.</p>
  </blockquote>
  
  <p>The error points to line 22 of my controller:</p>
  
  <blockquote>
    <p>Line 22:             SteamResponse response = JsonConvert.DeserializeObject(json);</p>
  </blockquote>
  
  <p>Here are my classes:</p>
  
  <pre><code>public class Game
  {
      public int appid { get; set; }
      public int playtime_forever { get; set; }
      public int? playtime_2weeks { get; set; }
  }
  
  public class SteamResponse
  {
      public int game_count { get; set; }
      public List&lt;Game&gt; games { get; set; }
  }
  
  public class RootObject
  {
      public SteamResponse response { get; set; }
  }
  </code></pre>
  
  <p>My controller looks like this:</p>
  
  <pre><code>        List&lt;Game&gt; gameList = new List&lt;Game&gt;();
  
          WebClient wc = new WebClient();
  
          var json = wc.DownloadString("http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=" + steamAPIKey + "&amp;steamid=76561197994394917&amp;format=json");
  
          SteamResponse response = JsonConvert.DeserializeObject&lt;SteamResponse&gt;(json);
  </code></pre>
  
  <p>I've visited the URL in browser to verify it's correct, and I've also tested the URL using JSON Lint. I'm not sure what I'm doing wrong here - I've checked other topics and checked for the problems they've listed but didn't find them. </p>
  
  <p><a href="http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=30A260C0B3B379A218C5533CC14CA96D&amp;steamid=76561197994394917&amp;format=json" rel="nofollow">Here is a link to the JSON I'm attempting to receive</a>.</p>