title: Generating newlines instead of CRLFs in Json.Net
body: <p>For my unix/java friends I would like to send newlines ('\n') instead of a CRLF (
  '\r\n') in Json.Net.  I tried setting a StreamWriter to use a newline without any success.  </p>
  
  <p>I think <strong>Json.Net</strong> code is using <code>Environment.NewLine</code> instead of calling <code>TextWriter.WriteNewLine()</code>.  Changing <code>Environment.NewLine</code> is not an option because I'm running as a server and the newline encoding is based on the request.</p>
  
  <p>Is there <strong>some other way</strong> to force newline for crlf?</p>
  
  <p>Here's my code -</p>
  
  <pre><code>using (var streamWriter = new StreamWriter(writeStream, new UTF8Encoding(false))
  {
       NewLine = "\n"
  })
  using (var jsonWriter = new JsonTextWriter(streamWriter) 
  { 
       CloseOutput = true, 
       Indentation = 2, 
       Formatting = Formatting.Indented 
  })
  {
         // serialise object to JSON
  }
  </code></pre>