Spaces:
Runtime error
Runtime error
File size: 370 Bytes
fa6856c |
1 2 3 4 5 6 7 8 9 10 |
import json
with open('/mnt/workspace/caixinyu/vicuna/Chinese-Vicuna/sample/instruct/legislation62k.jsonl', 'r') as file:
for line in file:
try:
json_obj = json.loads(line)
# 如果解析成功,json_obj 将包含每一行的 JSON 数据
except json.JSONDecodeError as e:
print(f"Error in line: {line.strip()}")
|