changed json2html so uses the api