I’m using the ijson library in Python to parse a large JSON file and I need to find the position in the file where specific data is located. I want to use file.tell() to get the current position of the file reader during the parsing process. But it’s only giving me the length of the file.
from ijson import parse
with open('file','r') as f:
for a, b, c in parse(f):
print(f.tell())