(file_path,data)
将json list写入text文件中
    :param file_path:
    :param data:
    :return:
将json list写入text文件中
    :param file_path:
    :param data:
    :return:
将json list写入text文件中 : param file_path : : param data : : return :
def json_to_text(file_path,data):
    '''
    将json list写入text文件中
    :param file_path:
    :param data:
    :return:
    '''
    if not isinstance(file_path, Path):
        file_path = Path(file_path)
    with open(str(file_path), 'w') as fw:
        for line in data:
            line = json.dumps(line, ensure_ascii=False)
            fw.write(line + '\n')
def json_to_text ( file_path , data ) : if not isinstance ( file_path , Path ) : file_path = Path ( file_path ) with open ( str ( file_path ) , 'w' ) as fw : for line in data : line = json . dumps ( line , ensure_ascii = False ) fw . write ( line + '\n' )