SHEN1017 commited on
Commit
0086d2b
·
verified ·
1 Parent(s): aa9c4b0

Update citekit/attribute/attribute.py

Browse files
Files changed (1) hide show
  1. citekit/attribute/attribute.py +2 -1
citekit/attribute/attribute.py CHANGED
@@ -39,7 +39,8 @@ def load_json(file_path):
39
  with open(file_path, 'r') as file:
40
  data = file.read()
41
  if file_path.endswith('.jsonl'):
42
- data = f'[{"},{".join(data.split("}\n{"))}]'
 
43
  objects = json.loads(data)
44
  return objects
45
 
 
39
  with open(file_path, 'r') as file:
40
  data = file.read()
41
  if file_path.endswith('.jsonl'):
42
+ joined = "},{".join(data.split("}\n{"))
43
+ data = f'[{{{joined}}}]'
44
  objects = json.loads(data)
45
  return objects
46