title: Download blob storage and return Json object
body: <p>I am trying to download a <code>.json</code> blob that I have stored in a container in the <code>Azure Storage</code> using <code>Newtonsoft.Json</code> to write it to an object.</p>
  
  <p>I am doing this by calling:</p>
  
  <pre><code>(CloudBlockBlob) blob.DownloadToStream(stream);
  </code></pre>
  
  <p>However, instead of writing the stream to a file in the local app directory, I want to return the json <code>object</code> doing <code>Json(result)</code></p>
  
  <p>This is what I have tried:</p>
  
  <pre><code>using (var stream = new MemoryStream())
  {
      blob.DownloadToStream(stream);
  
      var serializer = new JsonSerializer();
  
      using (var sr = new StreamReader(stream))
      {
          using (var jsonTextReader = new JsonTextReader(sr))
          {
              result = serializer.Deserialize(jsonTextReader);
          }
      }
  }
  </code></pre>
  
  <p>At the end my <code>jsonTextReader</code> variable is empty and the object <code>null</code></p>
  
  <p>What can I do to accomplish this? </p>
  
  <p>Thank you</p>