I’m trying to process JSON files exported from the Import/Export extension but my limited python-fu is failing me. json.loads
returns:
ValueError: No JSON object could be decoded
Trying to reformat the file from within vim
via:
:%!python3 -m json.tool
Results in:
Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)
Any pointers would be greatly appreciated. There’s some stuff on stackoverflow about using the io
module instead of json
to read the file but so far that is not helping either:
ValueError: Expecting object: line 1 column 2 (char 1)