I'm using the Last.fm API with jquery as follows:
$.getJSON('http://ws.audioscrobbler.com/2.0/?JSONCallback=?',{
method: "user.getweeklytrackchart",
user: "rj",
api_key: "fb04ae401284be24afba0fbc2f4b0efb"
}, function(data) {
//console.debug (data)
}
);
I'm getting the following error in Firebug:
missing ; before statement
[Break on this error] <lfm status="ok">\n
Clicking on the error takes me to the file that gets returned from the request. The error is occurring in line 2 (there are actually many more of the track objects but I've only included one for length):
<?xml version="1.0" encoding="utf-8"?>
<lfm status="ok">
<weeklytrackchart user="RJ" from="1278244800" to="1278849600">
<track rank="1">
<artist mbid="309c62ba-7a22-4277-9f67-4a162526d18a">Beck</artist>
<name>Mixed Bizzness</name>
<mbid></mbid>
<playcount>2</playcount>
<image size="small">http://userserve-ak.last.fm/serve/34/442288.jpg</image>
<image size="medium">http://userserve-ak.last.fm/serve/64/442288.jpg</image>
<image size="large">http://userserve-ak.last.fm/serve/126/442288.jpg</image>
<url>www.last.fm/music/Beck/_/Mixed+Bizzness</url>
</track>
</weeklytrackchart></lfm>
So the error is in the returned file, how do I deal with it? Thanks for reading.