function getJSON($arguments) { $lister = new ApiLister(); $result = $lister->processAPIs($this->getAPIs()); $json = array(); foreach ($result as $api) { $json[] = array('endpoint' => $api['endpoint'], 'title' => $api['title'], 'description' => $api['description'], 'params' => $api['params']); } return $json; }