Parsererror on valid json(p)
Hey people,
For retreiving data from a remote server (for a local app) I use jsonp. The ajax function returns a statuscode 200, statusText success, and chromes developer tools show I received the correct data, but it also gives me a parsererror. I have confirmed it is valid json, and it is properly parsed in chromes console.
Here's my code:
- $.ajax({
- dataType: "json",
- url: url,
- success: function(rdata){
- data.sampleData = rdata;
- console.log(rdata);
- },
- error: function(a,b,c){
- console.log(a);
- console.log(b);
- console.log(c);
- },
- complete: function(a,b,c){
- console.log(a);
- console.log(b);
- console.log(c);
- }
- })
- }
Any ideas?