Ah sorry that was my typo in that message – I was using the question mark. For anyone else that encounters this, I had two problems, one of which was my fault, the other not so much:
1) When doing a JSON request via ajax, arguments should be passed in as an object under ‘data’, such as:
var scope = this;
$.ajax({
url: "a url",
data: {post_type: "my_post_type", id: 4, json: "get_post"},
dataType: "json",
scriptCharset: "utf-8",
type: "POST",
success: function(data, msg) {
scope.myData = data;
scope.onJSONLoadComplete();
},
error: function(request, status, error) {
alert("JSON Load Error- status:" + status + " Error: " + request.status);
}
});
Doing a request leaving ‘data’ blank and having the ‘url’ like “www.mywebsite.com/?json=1&post_type=my_post_type&id=4” will work in the majority of browsers, but doesn’t work in IE6.
2) IE6 has a bug that means doing the above with the GET method will result in a 400. This isn’t an issue with the JSON API, it’s a browser bug. This is simply solved by using POST instead.
Anyway hope this helps someone.
Thanks for the plugin dphiffer, it really is a major feature for WordPress.