title: Writing Json using Newtonsoft.json.JsonTextWriter
body: <p>I am writing a json using Newtonsoft.json.JsonTextWriter.
  Here is my code:</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
  StringWriter sw = new StringWriter(sb);
  JsonWriter jsonWriter = new JsonTextWriter(sw);
  
  jsonWriter.Formatting = Formatting.Indented;
  
  jsonWriter.WritePropertyName("Name");
  jsonWriter.WriteValue("Allan");
  </code></pre>
  
  <p>And i am assuming that <code>sw</code> has the json format {"Name": "Allan"}. How can i get the written text in some string variable so that i can use this json data in my http request? </p>