결론부터 이야기하면 간단하다
옵션으로 ensure_ascii=False를 주면 된다.
json.dumps(content, indent=4, sort_keys=True, ensure_ascii=False)
오류 발생 사유는 json으로 읽어들일때 기본 값이 ensure_ascii=True인데, 아스키 말고도 다른 값을 가지고 있어서 깨짐 현상이 발생한다고 한다.
(참고 링크: https://kibua20.tistory.com/114)
'IT study > 06. selfStudy: code error' 카테고리의 다른 글
Fatal error in launcher: Unable to create process (1) | 2023.10.03 |
---|---|
vi 입력 에러 (0) | 2022.05.24 |
wsl install 시 0x800701bc error (0) | 2022.05.20 |
git error: Updates were rejected because the tip of your current branch is behind its remote counterpart. (0) | 2021.08.01 |
Python error: partially initialized module 'requests' has no attribute 'get' (most likely due to a circular import) (0) | 2021.08.01 |