I am getting a bit of headache just because a simple looking, easy statement is throwing some errors in my face.
I have a json file called strings.json like this:
Here is a copy of code which works fine for me
import json
with open("test.json") as json_file:
json_data = json.load(json_file)
print(json_data)
with the data
{
"a": [1,3,"asdf",true],
"b": {
"Hello": "world"
}
}
you may want to wrap your json.load line with a try catch because invalid JSON will cause a stacktrace error message.