I am trying to serialize a C# object to JSON using JSON.net library. The issue I am having is the string being created has "\'s in it.
Below is the string re
Your json string is being HTML encoded. Since you're rendering the json in your view, you can use the @Html.Raw() helper to prevent it from being encoded.
@Html.Raw()
var data = { json : "@Html.Raw(JsonConvert.SerializeObject(Model))" };