Bug Tracker

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#8940 closed bug (duplicate)

$.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:


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" );


getJSON: function( url, data, callback ) {
		return jQuery.get( url, data, callback, "text json" );

the problem is corrected.

Change History (4)

comment:1 Changed 11 years ago by timmywil

Component: unfiledajax
Owner: set to rhoffman
Priority: undecidedlow
Status: newpending

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.

comment:2 Changed 10 years ago by rhoffman

Status: pendingnew

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

comment:3 Changed 10 years ago by jaubourg

Resolution: duplicate
Status: newclosed

comment:4 Changed 10 years ago by jaubourg

Duplicate of #8084.

Note: See TracTickets for help on using tickets.