HI
I am serializing to a JSON object using
JavaScriptSerializer js = new JavaScriptSerializer();
HttpContext.Current.Response.ContentType = "application/json";
HttpContext.Current.Response.Write(js.Serialize(response));
response is of Class
public class Response
{
public bool success;
public int id;
public string error;
}
and in my JavaScript file I am deserializing
using
var sResponse = Sys.Serialization.JavaScriptSerializer.deserialize(response);
For IE and Safari response is properly deserialized.
But for firefox it says The data doesnt correspond to a valid JSON.