Wouldn't it better to return an object instead of an array ?

$app->json(array('task-manager' => array('scheduler' => $manager, 'tasks' => $tasks)));