[eluser]Seppo[/eluser]
yes, you can fetch the view instead of outputing it, setting a third parameter to TRUE.
You also need to use $this->load->view instead of $this->view, although this last one works on PHP 4, but not on PHP 5.
And instead of "echo" you can use $this->output->set_output(json_encode($json))