import jsonlines def read_jsonl(path): content = [] with jsonlines.open(path, "r") as json_file: for obj in json_file.iter(type=dict, skip_invalid=True): content.append(obj) return content questions = read_jsonl('data/question.jsonl') for question in questions: print(question)