Python code to load data from some long complicated JSON file:
with open(filename, \"r\") as f:
data = json.loads(f.read())
(note: the be
Just hit the same issue and in my case the problem was related to BOM (byte order mark) at the beginning of the file.
json.tool would refuse to process even empty file (just curly braces) until i removed the UTF BOM mark.
What I have done is:
set nobomb)This resolved the problem with json.tool. Hope this helps!