function JSON($object = null) {
		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); 
		header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); 
		header("Cache-Control: no-cache, must-revalidate" ); 
		header("Pragma: no-cache" );
		header('Content-type: application/json');

		if (is_array($object)) {
			echo json_encode($object, $this->JSONOptions);
		} else if (is_bool($object)) {
			echo 0;
		} else if (is_string($object)) {
			echo $object;
		} else if (is_null($object)) {
			echo 'null';
		} else {
			die('Unknown object type to convert into JSON: ' . gettype($object));
		}

		if ($this->fatal)
			exit;
	}