JavaScriptSerializer to escape chars
<p>I'm trying to extend strings and create a simple function that makes the string "JSON safe".</p>

<pre><code>public static string ToJSON(this object obj)
{
    JavaScriptSerializer serializer = new JavaScriptSerializer();

    return serializer.Serialize(obj);
}
</code></pre>

<p>But when I run the testcode:</p>

<pre><code>string msg= _rep.GetResource("Delete_Confirm").ResourceValue.ToJSON();
</code></pre>

<p>It seems to add extra " around the string like this:</p>

<p>""Are you sure you want to delete \"Helo KittY\"?""</p>
