Upon calling a FLickrAPI, the returned xmlhttp.responseText
appears as follows:
jsonFlickrApi({"photos":{"page":1, "pages":200, "perpage":100, "total":"19934",
"photo":[{"id":"7315581986", "owner":"62691288@N00", "secret":"504915125a",
"server":"7090", "farm":8, "title":"China, Tiananmen Square", "ispublic":1,
"isfriend":0, "isfamily":0}, {"id":"7308693706",
...
An attempt to parse it is made in this manner:
var jsonResponse = xmlhttp.responseText ;
jsonResponse = eval("("+jsonResponse + ")");
var output += jsonResponse.photos.photo[1].id ;
alert(output);
The error message from Firebug reads: jsonFlickrApi is not defined
What could be causing this error message?
Why is 'eval' required in the initial step?