I'm setting up an AJAX system and I have a controller that I need to return JSON data. In the examples so far, all of the controllers end with a call to the view:
$this->renderc( 'interest', $data );
I'd like to return straight JSON for use with jQuery, but the code below is not quite working right:
return json_encode($data);
because the return comes through as the header, not the content in Firebug. Heeeelp!