If you want to open a file then use the open function
It returns a file handle to read (or write) files. Read the contents and then pass it through a json parser
with open("path/to/file.json", "r") as f:
contents = f.read()
# Do something with contents (like parse it into JSON)
os.chdir changes the current working directory and as such I don't think it can be used to open a file
If you want to open a file then use the open function
It returns a file handle to read (or write) files. Read the contents and then pass it through a json parser
os.chdir
changes the current working directory and as such I don't think it can be used to open a file