title: De-serialize JSON using JSON.net on WP7
body: <p>I'm trying to grab some JSON data from a web service using JSON.Net. The error I'm getting is an unexpected character whilst parsing the json data. The code i'm using is as follows:</p>
  
  <pre><code>HttpWebRequest request;
  WebResponse response;
  
  private void btnGet_Click(object sender, RoutedEventArgs e)
  {
      request = WebRequest.Create(@"http://http://domain.com/test/question.php") as HttpWebRequest;
      request.BeginGetResponse(AfterRequest, null);
  }
  
  private void AfterRequest(IAsyncResult result)
  {
      response = request.EndGetResponse(result);
      using (StreamReader sd = new StreamReader(response.GetResponseStream()))
      {
          string resultString = sd.ReadToEnd();
  
          Dictionary&lt;string, string&gt; values = JsonConvert.DeserializeObject&lt;Dictionary&lt;string, string&gt;&gt;(resultString);
          response.Close();
          MessageBox.Show(values["Question"]);
      }
  }
  </code></pre>
  
  <p>The data I'm trying to de-serialize is:</p>
  
  <pre><code>{"Question":"How old am i?","A":"20","B":"23","C":"25","D":"26","Z":"D"}
  </code></pre>
  
  <p>This data is outputted via php/mysql. Any idea's if it's my code or the JSON data that's invalid?</p>
  
  <p>thanks
  <strong>EDIT:</strong> I've updated the data i'm trying to de-serialize, it now looks like this;<code>{
      "Question": "How old am i?",
      "Answers": {
          "A": "24",
          "B": "25",
          "C": "26",
          "D": "27"
      },
      "Answer": "B"
  }</code></p>