Alex Rivera | Logout

JQuery 1.5 and new "Text JSON" datatype

Asked 2011-02-10T09:57:55.413
15

I have just updated to JQuery 1.5 and all my ajax calls that return JSON and a number of plugins instantly broke.

In my pre-1.5 code, I specified the dataType like:

dataType: "json"

Changing the dataType to:

dataType: "text json"

Fixes the problem but I do not want to manually change the plugins as this will affect upgrades.

Is there a way of handling this better with less disruption?

Edit
Report

1 Answer

4

I came across this JQuery bug which fixes the problem http://bugs.jquery.com/ticket/8084.

Adding the following code after the JQuery script declaration fixes the problem:

$.ajaxSetup({ jsonp: null, jsonpCallback: null });

answered 2011-02-15T16:33:51.833

Your Answer