Added JSON output to task, taskcollection