set format and output .json file