I'm trying to read a json from my Django server. I'm using $.getJSON
call, but it fails. What's wrong?
Here's my Ajax code:
get: function() {
$.getJSON("http://url.herokuapp.com/getdata?jsoncallback=?",
{
tags: "jquery,javascript",
tagmode: "any",
format: "json"
},
function(data) {
$.each(data.items, function(item){
console.log(item);
});
});
}
And this is the error:
SyntaxError: missing ; before statement
{"string"*:* "Prove that I send JSON typing some random text", "status": "Done"}
What is marked with * *
is where the error is located.
MORE INFO:
I'm starting a Phonegap app that will work with my existing web app (Just in case this info it helps)