Python ValueError: No JSON object could be decoded, What to be done?
I think that the .read() function is moving the cursor to the end of the file. Try the below code:
for filename in filenames:
with open(os.path.join(dirname,filename)) as fd:
json_data = json.load(fd)