Switch to a custom JSON middleware