Commit 1923a361 authored by Hippalectryon's avatar Hippalectryon

json load fix

parent 050273a8
import json
import ijson
import os
import pathlib
from typing import List, Union
......@@ -29,8 +30,9 @@ def load_data_dirname(input_dir: str, input_file: str) -> Union[list, dict]:
def load_data(input_file: str) -> Union[list, dict]:
with open(input_file, "r") as f:
data = json.load(f)
with open(input_file, 'r') as f:
objects = ijson.items(f, 'meta.view.columns.item')
data = list(objects)
return data
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment