I receive an html encoded string from server code and I want to convert it to JSON using $.parseJSON but it throws the exception. This is the string returned by asp.net's JavaScript serializer:
{"Property":"Name","Template":"\u003cinput data-val=\"true\" data-val-number=\"The field ID must be a number.\"....
String is correct as returned by JS serializer but when I call
var data = '<%=serializer.Serialize(Model))%>';
data = $.parseJson(data);
// I also tried $.parseJSON(unescape(data)) but with no luck
The situation is that I can't prevent html encoding of string on server side. How can I parse this string to JSON?