Side navigation
#8940 closed bug (duplicate)
Opened April 21, 2011 07:54PM UTC
Closed April 25, 2011 02:22PM UTC
Last modified March 14, 2012 05:47AM UTC
$.getJSON does not use "text json" converter
Reported by: | rhoffman | Owned by: | rhoffman |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | ajax | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I was previously using jQuery 1.4.x, and upgraded to 1.5.2. Some of my calls to .getJSON have stopped working. If I change the calls to a regular .get, and then in the first line of the callback run jQuery.parseJSON on the result, it works fine. After some debugging, I have determined that the problem is with the new jQuery AJAX converter system and the .getJSON convinence method. If it is changed from:
getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); },
to:
getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "text json" ); },
the problem is corrected.
Attachments (0)
Change History (4)
Changed April 21, 2011 08:02PM UTC by comment:1
component: | unfiled → ajax |
---|---|
owner: | → rhoffman |
priority: | undecided → low |
status: | new → pending |
Changed April 22, 2011 02:35PM UTC by comment:2
status: | pending → new |
---|
Unfortunately, I can not do this on jsfiddle, since this involves an HTTP GET request, and jsfiddle only supports POST requests.
Here is another blog post with another user that has this issue: http://documentsnotincluded.blogspot.com/2011/03/jquery-151-and-converters.html
Changed April 25, 2011 02:22PM UTC by comment:3
resolution: | → duplicate |
---|---|
status: | new → closed |
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket.
Additionally, test against the
jQuery (edge)
version to ensure the issue still exists.