Q:

jQuery, ajax request doesn't success with JSON on IE

I made an AJAX call and it works on FF & Chrome but not on IE 7-8-9. I'm loading a JSON file from my domain:
    $.ajax({
        url: 'js/jquery.desobbcode.json',
        dataType: 'json',
        cache: false,
        success: function(json) {
            alert('ok');
        },
        error: function(xhr, errorString, exception) {
            alert("xhr.status="+xhr.status+" error="+errorString+" exception="+exception);
        }
    });

I also tried by adding contentType: 'application/json' but I receive the same output which is :
xhr.status=200
error=parsererror
exception=SyntaxError Unterminated string constant

I checked my JSON file with JSONLint and it's OK. I checked if there is an extra comma and the content is also trimmed. See my JSON file
If I put dataType: 'text', I receive the OK alert but a debug popup too.
Could you help me? Regards.

A:

IE is known to have issues with implied content types.

... the new XmlHttpRequest class in Internet Explorer 7 doesn’t implement setRequestHeader very intuitively. Instead of setting the specified header, it appends the value.

Try specifying a contentType and check what's coming back from the server:
$.ajax({
    url: 'js/jquery.desobbcode.json',
    dataType: 'json',
    contentType: "application/json; charset=utf-8",
    ...
});

You may also want to try sending blank data:
$.ajax({
    url: 'js/jquery.desobbcode.json',
    dataType: 'json',
    contentType: "application/json; charset=utf-8",
    data: {}
    ...
});

