/read_write_file.py Secret
Created
March 16, 2024 20:48
Spotify API - read file - empty file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def from_file_to_json_obj(file_path): | |
if Path(file_path).exists(): | |
f = open(file_path) | |
json_obj = json.load(f) | |
f.close() | |
return json_obj | |
return {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment