During my last large project we had several parts of the site that consumed JSON data received using jQuery's $.get() function. For most of the project, we created separate actions each time that we needed to query for JSON data versus sending out HTML data. Deep into the project we found out that you can do a simple check to with Zend_Request::isXmlHttpRequest().

[code language="php"]
// check to see if this is an AJAX request
if($this->getRequest()->isXmlHttpRequest()){
// Use Zend's JSON helper to make quick work of this request
$this->getHelper('json')->sendJson($arrayData);
}
[/code]

Needless to say we felt stupid for having to duplicate a lot of our actions.