Actually .getJSON() supports cross domain access in two ways. JSONP, which doesn't use GET or POST but script injection; but also CORS - and .post() also supports CORS. However CORS requires that the server also support it whereas JSONP does not.
–
hippietrailDec 22 '11 at 8:55

1

Not true, JSONP also requires server support to parse the callback parameter.
–
ShrulikMay 31 '13 at 18:47

This will never bypass the limit GET has while POST maximum size can be redefined.
–
DementicNov 12 '12 at 14:39

Why did you add ?callback? in url? That made the callback not to be called for me. I also added JSON.stringify(data). +1, helpful post!
–
Ionică BizăuNov 8 '14 at 18:38

@IonicăBizău: thanks. In order to return an object, we need to add "callback" parameter to the URL and the server needs to return the same object name generated by JQuery. I also use an override function for getJSON(): jQuery.getJSON = function(url, data, func) { return $.get(url+(url.indexOf("?") == -1 ? "?" : "&")+"callback=?", data, func, "json"); }
–
lepeNov 10 '14 at 2:55

$.getJSON() is pretty handy for sending an AJAX request and getting back JSON data as a response. Alas, the jQuery documentation lacks a sister function that should be named $.postJSON(). Why not just use $.getJSON() and be done with it? Well, perhaps you want to send a large amount of data or, in my case, IE7 just doesn’t want to work properly with a GET request.

It is true, there is currently no $.postJSON() method, but you can accomplish the same thing by specifying a fourth parameter (type) in the $.post() function: