using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text.RegularExpressions;
namespace HelloWorldMvcApp
public class HomeController : Controller
public ActionResult Index()
var xml = "{\"src\": \"/media/11181/asta-r-logo.png\", \"crops\": []}";
var xml2 = "{src: '/media/7871/165503.png', crops: []}";
var unescape = Regex.Unescape(xml);
var unescape2 = Regex.Unescape(xml2);
var jsonxml = HttpUtility.JavaScriptStringEncode(System.Web.Helpers.Json.Encode(unescape));
var jsonxml2 = HttpUtility.JavaScriptStringEncode(System.Web.Helpers.Json.Encode(unescape2));
return View(new SampleViewModel());