json 저장

    Python JSON 파일(.json) 저장 및 불러오기

    Python의 dictionary type과 JSON 파일(.json)은 호환이 가능하다! 저장 import json dictionary_example = {'장소명': '경복궁', '주소': '서울 종로구 사직로 161 경복궁', '전화번호': '02-3700-3900', '홈페이지': 'http://www.royalpalace.go.kr/'} file_path = "C:/Users/user/Desktop/test/" with open(file_path + "test.json", 'w') as f: json.dump(dictionary_example, f) 영어만을 저장하면 문제가 없지만, 한글이 포함되어있는 경우에는 아래와 같이 유니코드 16진수로 표현됨 {"\uc7a5\uc18c\uba85": "\..