728x90
반응형
json 으로 열고 작성할 때, 아래 사진과 같이 unicode형태로 한글이 저장되는 현상이 존재한다.
with open(output_jsonpath, 'w', encoding='utf-8-sig') as f:
output_json = json.dumps(output_json_dict, ensure_ascii=False, indent='\t')
f.write(output_json)
다음과 같이 "ensure_ascii=False"를 dumps 함수 인자로 넣어주면 해당 현상이 사라진다.
728x90
반응형