Dying on dispatch is somewhat surprising behaviour! Good catch. It’s not mentioned in the documentation, either.

There is actually also a JSON view helper (used by the JSON action helper) that would seem to do what Stefan wants. (It disables layouts, sets the header, but otherwise doesn’t interfere with dispatch.)

I’m still thinking about this, but I don’t have any particular problem with a JSON action helper that in some sense “bypasses” a view. (Is this your complaint?) What would the view do in the case of JSON output? It wouldn’t do anything very exciting, and you’d end up having to duplicate a bunch of boring boilerplate code.