JSON object with cuts in it
I am serializing a json object using:
public static string ToJson(this object obj)
{
JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
return jsonSerializer.Serialize(obj);
}
However, when I fill in the hidden field, I get forward slashes with it:
"[{\" ImageLink \ ": \" \ ", \" ShowOnHomePage \ ": null, \" Type \ ": \" AdListItem \ ", \" Key \ ": NULL, \" Title \ ": \" dsafdsaf \ ", \" URL \ ": \" fdsafdsa \ ", \" ContentSummary \ ": \" \ u003cdiv \ u003efdsafdsa \ u003c / div \ u003e \ "}, {\" ImageLink \ ": \" \ ", \ "ShowOnHomePage \": null, \ "Type \": \ "AdListItem \", \ "Key \": null, \ "Title \": \ "hddfg \", \ "URL \": \ "dsaf \ ", \" ContentSummary \ ": \" \ u003cdiv \ u003efdsafdsa \ u003c / div \ u003e \ "}, {\" ImageLink \ ": \" \ ", \" ShowOnHomePage \ ": null, \" Type \ ": \ "AdListItem \" \ "Key \ ": null, \" Title \ ": \" asfd \ ", \" URL \ ": \" Asdf \ ", \" ContentSummary \ ": \" \ u003cdiv \ u003eafds \ u003c / div \ u003e \ " }] "
How should I properly get rid of the \ "and replace them with a simple" ???
Any ideas?
Thanks.
a source to share