Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- #Anaconda
- #activation function
- Linux
- #비선형
- #torchvision
- #landmark
- #Linux
- #Jetson nano
- #annotation
- #pytorch
- #gpu training
- #선형
- #object detection
- pytorch
Archives
- Today
- Total
Wooks_learning
Json파일 저장 시 한글 깨짐 오류 본문
Json파일을 json.dump를 통해서 저장할 때 한글이 섞여있으면 위와 같이 한글이 깨지게 된다.
import json
create_json = {
'1번 Key입니다.' : 1,
'2번 Key입니다.' : 2
}
with open('test.json', 'w') as f:
json.dump(create_json, f, ensure_ascii=False)
dump의 매개 변수로 ensure_ascii = False를 주면 한글이 깨지지않고 잘 저장이 된다.
'Errors > Python' 카테고리의 다른 글
Comments