로딩
요청 처리 중입니다...

json 파일 생성, 읽기, 수정

 json 파일 생성, 읽기, 수정

1. 파일 생성하기 data = { "access_token":"", "access_token_date":"260113", "refresh_token":"", "refresh_token_date":"270101" } with open("token.json", "w", encoding="utf-8") as f: json.dump(data, f, ensure_ascii=False, indent=4) print("생성완료") 2.

파일 읽기 with open("token.json", "r", encoding="utf-8") as f: data = json.load(f) print(data["access_token"]) print(data["access_token"]) 3. 파일 수정하기 with open("token.json", "r", encoding="utf-8") as f: data = json.load(f) data["access_token_date"] = "260112" with...