Answer the question
In order to leave comments, you need to log in
Python How to fix encoding in file for JSON?
Filled a JSON file with data using Python on Windows.
When I transferred it to MacOS, I fixed the encoding to UTF8 and began to parse this file, but an error appeared:
json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)
Answer the question
In order to leave comments, you need to log in
I also figured it out a month ago - https://stackoverflow.com/questions/13156395/pytho...
But really just save json in correct UTF-8.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question