Only serve JSON for those actions that need it.