how to open json file using python

75 views Asked by At

JSONDecodeError: Expecting ':' delimiter: line 1 column 8388729 (char 8388728)

import json
with open('tweets.json') as jfile:
  d = json.load(jfile)

i tried using this code.but it did not work. this is the sample data enter image description here

1

There are 1 answers

0
shamnad sherief On BEST ANSWER

The error shows that your json data is not valid. There must be some syntax error in the json data. Specifically, it seems that there is a problem with the delimiter (':') at the specified line and column number.

You can use any JSON validator to find out the issue. You can try this or this with a pretty formatter