public function renderAsJson($data = false, $parent = 0)
    {
        $args = func_get_args();

        if (count($args) < 1) {
            $data = $this->renderAsArray();
        } else {
            $data = $this->renderAsArray($data);
        }

        return json_encode($data);
    }