renders json and html