#8118 closed bug (invalid)
ajax datatype json acts as jsonp for jquery 1.5
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | ajax | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
used jquery.autocomplete which added $.ajax{dataType:"json"}
which results in query adds jsonp callback and further the callback will cause a parse error, when removing the dataType
spec. will cause correct behavior. In my scenario the response data structure is => [{"someproperty":"somevalue"}, {"someproperty":"somevalue"}]
Did a quick search for json in jquery-1.5.js and found this on row 6905:
// Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, dataIsString /* internal */ ) {
removing the "json" from first argument will add correct behavior when spec. dataType:"json"
Change History (5)
comment:1 Changed 12 years ago by
Component: | unfiled → ajax |
---|---|
Description: | modified (diff) |
Priority: | undecided → low |
comment:2 Changed 12 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:3 follow-up: 4 Changed 12 years ago by
Are you using the jquery-validation plugin? It is not compatible with jQuery 1.5 and in particular causes the symptom you describe.
https://github.com/jzaefferer/jquery-validation/issues#issue/36
comment:4 Changed 12 years ago by
Status: | pending → new |
---|
Yes, that is correct. I removed jquery-validation from loading and it makes things work. You can close this issue.
Thanks, Daniel
Replying to john.firebaugh:
Are you using the jquery-validation plugin? It is not compatible with jQuery 1.5 and in particular causes the symptom you describe.
https://github.com/jzaefferer/jquery-validation/issues#issue/36
comment:5 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for taking the time to contribute to the jQuery project by writing a bug report.
Please submit a reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net. So that we can investigate this issue further.
How to report bugs