output to json and html