output to json file