how do i write json data to a file in python?,"json.dump(data, outfile)"