Python ValueError: No JSON object could be decoded, What to be done?

666    Asked by DorothyChurchill in Python , Asked on Mar 2, 2021

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)



Your Answer

Interviews

Parent Categories