We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery.parseJSON is deprecated in favor of JSON.parse. Does it make sense to move to JSON.parse?
jQuery.parseJSON
JSON.parse
JQMIGRATE: jQuery.parseJSON is deprecated; use JSON.parse Cause: The jQuery.parseJSON method in recent jQuery is identical to the native JSON.parse. As of jQuery 3.0 jQuery.parseJSON is deprecated. Solution: Replace any use of jQuery.parseJSON with JSON.parse. Same question as #259, does it makes sense to clear up the deprecation?
JQMIGRATE: jQuery.parseJSON is deprecated; use JSON.parse
Cause: The jQuery.parseJSON method in recent jQuery is identical to the native JSON.parse. As of jQuery 3.0 jQuery.parseJSON is deprecated.
Solution: Replace any use of jQuery.parseJSON with JSON.parse.
Same question as #259, does it makes sense to clear up the deprecation?
Source
@@ -289,11 +289,11 @@ var Intercooler = Intercooler || (function() { target = getTarget(elt); // Deprecated API if (xhr.getResponseHeader("X-IC-Trigger-Data")) { - var triggerArgs = $.parseJSON(xhr.getResponseHeader("X-IC-Trigger-Data")); + var triggerArgs = JSON.parse(xhr.getResponseHeader("X-IC-Trigger-Data")); triggerEvent(target, triggerValue, triggerArgs); } else { if (triggerValue.indexOf("{") >= 0) { - $.each($.parseJSON(triggerValue), function(event, args) { + $.each(JSON.parse(triggerValue), function(event, args) { triggerEvent(target, event, args); }); } else { @@ -304,7 +304,7 @@ var Intercooler = Intercooler || (function() { var localVars = xhr.getResponseHeader("X-IC-Set-Local-Vars"); if (localVars) { - $.each($.parseJSON(localVars), function(key, val) { + $.each(JSON.parse(localVars), function(key, val) { localStorage.setItem(key, val); }); } @@ -570,7 +570,7 @@ var Intercooler = Intercooler || (function() { function processIncludes(data, str) { if ($.trim(str).indexOf("{") == 0) { - var obj = $.parseJSON(str); + var obj = JSON.parse(str); $.each(obj, function(name, value) { data = appendData(data, name, value); });
The text was updated successfully, but these errors were encountered:
JSON.parse() is javascript standard built in standard function where parseJason() is only available if we use jQuery library.
Sorry, something went wrong.
Create a PR and I'll gladly accept it. (two years later :)
No branches or pull requests
jQuery.parseJSON
is deprecated in favor ofJSON.parse
. Does it make sense to move toJSON.parse
?Source
The text was updated successfully, but these errors were encountered: