jQuery ajax禁用解析

Im working with some gaming api, which upon request returns data in json format.

The problem is, api is on different domain so I'm not allowed to use dataType: "json" because of cross domain policy (error: No 'Access-Control-Allow-Origin' header is present on the requested resource). So I tried to use jsonp instead. When I use jsonp, jQuery throws parseError, since data from server is json and not jsonp.

I already tried jsonpCallback and everything of this kind - server still returns json.

I also tried to use xhr.responseText, but is empty. Is there ANY way to just tell jQuery not to parse data - I can parse the string manually, just datatype has to be set on jsonp for server to respond correctly.

And the data is returned from server. I know it is not empty, I can inspect it using developer tools in chrome.

My code:

$.ajax({
    url: "http://eu.battle.net/api/wow/character/turalyon/Blargh",
    type: "get",
    data: { fields: "quests" },
    dataType: "json",
    success: function(data, textStatus, jqXHR){
        if(typeof func === "function"){
            func(data);
        }
    },
    error: function(jqXHR, textStatus, errorThrown){
        contentField.html(textStatus);
    }
});

jQuery isn't parsing the data. JSONP works by encoding the data as an argument to a function call in a script that consists of only that function call and then loading it by adding a script element to the document.

The JavaScript engine is trying to execute the JavaScript.

You can't access arbitrary data by trying to load it as JSONP. The site you are requesting it from has to supply it in JSONP format. Anything else would make the same origin policy utterly pointless.