Consider this code:
// Dictionary created.
Dictionary<string, string> objDic = new Dictionary<string, string>();
string test = "<>";
objDic.Add("html", test);
var Json = new JavaScriptSerializer();
string response = Json.Serialize(return_obj);
Output response:
[{"html":"\u003c\u003e"}]
Expected response:
[{"html":"<>"}]
How do I get the expected response?
Then you can use Json.NET:
var str = JsonConvert.SerializeObject(new {html="<>"}) //returns {"html":"<>"}