I am having a strange problem while trying to parse JSON strings in a jQuery AJAX response. Here is my code:
$.ajax({
type: "POST",
url: "Save",
data: {
expiry: expiry,
settings: settings
}
}).done(function (msg) {
alert(msg);
var obj = jQuery.parseJSON(msg);
if (obj.status == "done") {
window.location = obj.redirect;
}
});
In IE, Chrome and Safari, I get a JSON string in warning mode, but in Firefox I get
[obj XMLDocument]
in the message.
Here is the FF console:

obj is null , but I see the response JSON string in the console in a text attribute
responses=Object { xml=document, text="{"status":"done","redir...ippetImage\/s\/6abb68"}
Any reason for this behavior?
source
share