IE7 not digesting JSON: "parse error"

Posted by Kenny Leu on Stack Overflow See other posts from Stack Overflow or by Kenny Leu
Published on 2010-03-13T18:12:34Z Indexed on 2010/03/13 18:15 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

While trying to GET a JSON, my callback function is NOT firing.

$.ajax({ type:"GET",
         dataType:'json',
         url: myLocalURL,
         data: myData,
         success:
           function(returned_data){alert('success');}
       });

The strangest part of this is that

  1. my JSON(s) validates on JSONlint
  2. this ONLY fails on IE7...it works in Safari, Chrome, and all versions of Firefox. If I use 'error', then it reports "parseError"...even though it validates!

Is there anything that I'm missing? Does IE7 not process certain characters, data structures (my data doesn't have anything non-alphanumeric, but it DOES have nested JSONs)? I have used tons of other AJAX calls that all work (even in IE7), but with the exception of THIS call.

An example data return here is:

{"question":{
             "question_id":"19",
             "question_text":"testing",
             "other_crap":"none"
            },
  "timestamp":{
              "response":"answer",
              "response_text":"the text here"
              }
}

I am completely at a loss. Hopefully someone has some insight into what's going on...thank you!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ajax