I am trying to read a dictionary from a JSON file which would look something like this.
{"@C": "C:\\Users\\user\\examplefolder}
I would like to load the dictionary from the file into filepath_dict
. I am currently using this method to try this however, it refuses to load anything that is not a string.
import json
with open("filepaths.json", "r") as file:
file.write(json.loads(filepaths_dict))
How can I load the JSON dictionary into a python one?