title: Getting JSON data from a response stream and reading it as a string?
body: <p>I am trying to read a response from a server that I receive when I send a POST request. Viewing fiddler, it says it is a JSON response. How do I decode it to a normal string using C# Winforms with preferably no outside APIs. I can provide additional code/fiddler results if you need them.</p>
  
  <p>The fiddler and gibberish images:</p>
  
  <p><img src="https://i.stack.imgur.com/SAoCR.jpg" alt="Gibberish"><img src="https://i.stack.imgur.com/MxYAI.jpg" alt="JSON"></p>
  
  <p>The gibberish came from my attempts to read the stream in the code below: </p>
  
  <pre><code>Stream sw = requirejs.GetRequestStream(); 
  sw.Write(logBytes, 0, logBytes.Length); 
  sw.Close(); 
  response = (HttpWebResponse)requirejs.GetResponse();
  Stream stream = response.GetResponseStream(); 
  StreamReader sr = new StreamReader(stream); 
  MessageBox.Show(sr.ReadToEnd());
  </code></pre>