title: ASP.NET MVC passing string to JSON.parse with quote escaping issue
body: <p>I hit a problem with JSON.
  I want to pass serialized object to a JSON.parse method in JS.
  Everything works fine until one of string values does not have quotes, like for example HTML code. Then you get JSON parse error in JS.</p>
  
  <p>Simply I get:</p>
  
  <pre><code>var test = JSON.parse('{"test":"&lt;p&gt;Terms &lt;a href=\"google.pl\"&gt;&lt;/a&gt;&lt;/p&gt;"}');
  </code></pre>
  
  <p>But what works is:</p>
  
  <pre><code>var test = JSON.parse('{"test":"&lt;p&gt;Terms &lt;a href=\\"google.pl\\"&gt;&lt;/a&gt;&lt;/p&gt;"}');
  </code></pre>
  
  <p>Here is my test view code, any thoughts?
  How to pass this object properly?</p>
  
  <pre><code>@{
      Layout = null;
  }
  
  @{
      string args = Newtonsoft.Json.JsonConvert.SerializeObject(new
      {
          test = @"&lt;p&gt;Terms &lt;a href=""google.pl""&gt;&lt;/a&gt;&lt;/p&gt;"
      }, new Newtonsoft.Json.JsonSerializerSettings
      {
          ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver(),
      });
  }
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;title&gt;Index&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script&gt;
          var test = JSON.parse('@Html.Raw(args)');
      &lt;/script&gt;
      &lt;div&gt; 
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>