import json,codecs def records(path): dec=json.JSONDecoder(); utf=codecs.getincrementaldecoder('utf-8')();buf=''; state='start' with path.open('rb') as f: while True: chunk=f.read(1024*1024);buf+=utf.decode(chunk,final=not chunk);pos=0 while True: while pos