Zend\'s documentation isn\'t really clear on this.
The problem is that, by default, Zend automatically renders a view at the end of each controller action. If you\'re us
Or you could simply put die() function at the end of the action
public function someAction() { echo json_encode($data); die(); }