Things like that happen when you don’t let the view generate all output. This is in my opinion a design flaw in ZF.

Generating JSON from data is the view’s job, whether the view uses a helper to accomplish that does not really matter, but if no view is involved, that is definitely wrong.