title: How to download JSON in Windows Phone
body: <p>I am trying to download a JSON in my Windows Phone app &amp; then parse it. Searching through the internet i found that something like code above should work fine:</p>
  
  <pre><code>using (WebClient wc = new WebClient())
  {
      string result = wc.DownloadString("http://data.nature.com/sparql");
  }
  </code></pre>
  
  <p>but in my windows phone app I can not assign <code>wc.DownloadStringAsync()</code> into a string type variable.</p>
  
  <p>My Code: </p>
  
  <pre><code>WebClient webClient = new WebClient();
          webClient.DownloadStringAsync(new Uri("http://184.22.234.221/bfunction/mjson.php"));
          var container = DeserializeFromJson&lt;DataJsonAttributeContainer&gt;(JsonStr); 
  </code></pre>
  
  <p>Here, JsonStr is the string where I want to assign the downloaded JSON data. How can I do that?</p>