title: What is the correct way to force JSON.Net to escape forward slash (solidus) characters?
body: <p>So for business reasons I need to force JSON.NET to escape a JSON blob like so:</p>
  
  <p><code>{ url: 'http://some.uri/endpoint' }</code></p>
  
  <p>As </p>
  
  <p><code>{ "url": "http:\/\/some.uri\/endpoint" }</code></p>
  
  <p>Which is to say it needs to escape the forward-slash solidus characters.  I <em>know</em> the JSON spec doesn't require this, and than technically the two are equal, but in this particular situation I need to create the exact same string with JSON.NET as I'm getting from somewhere else.</p>
  
  <p>What's the best way to coerce JSON.NET to do this?</p>
  
  <p>Would it make sense to create a new JSONConverter subclass (e.g. MyPedanticStringConverter) and use that like so?</p>
  
  <pre><code>string json = JSONConvert.SerializeObject(
      myObject, 
      Formatting.None, 
      new MyPedanticStringConverter());
  </code></pre>