As a result of reading the json file, python gives the error:
Traceback (most recent call last): File "C:\Users\guest_user\Documents\test json code.py", line 8, in <module> fgh = json.loads(data) File "C:\Python27\lib\json\__init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Script:
# -*- coding: utf-8 -*- import json import sys, codecs import io with open('top100.json') as f: data = f.read() fgh = json.loads(data) print(fgh) The file is saved in unicode format, utf-8 does not help. File content is valid:
[[1, "joke1"], [2, "шутка"]] Tell me how to solve the problem?