I tried to load a .json file with standard JSON library. It works fine, but slowly: with open(file, 'r', encoding="utf-8") as jfile: lines = json.loads(jfile.read()) I tried to use the orjson library, but the same code throws an error: JSONDecodeError: str is not valid UTF-8 with open(file, 'r', encoding="utf-8") as jfile: lines = orjson.loads(jfile.read()) How to handle this error? Continue reading...