Well, I assume that your JsonParser::readJSONFeed
method expects a URL as parameter but you're calling it with a JSON text as argument (urls[0]
contains the content
variable that you give to the task).
Try to replace
return new JsonParser().readJSONFeed(urls[0]);
by
return urls[0];
(in fact you don't need a task in that case)