pickles/classes/Viewer/JSON.php
Josh Sherman 046d265347 Added the new classes and stuff.
git-svn-id: http://svn.cleancode.org/svn/pickles@30 4d10bc64-7434-11dc-a737-d2d0f8310089
2008-07-12 23:28:44 +00:00

18 lines
365 B
PHP

<?php
class Viewer_JSON extends Viewer_Common {
public function display() {
header('Content-type: application/json; charset=utf-8');
if (!function_exists('json_encode')) {
echo '{ "type" : "error", "message" : "json_encode() not found" }';
} else {
echo json_encode($this->model->getData());
}
}
}
?>