Closed ftudisco closed 6 months ago
Describe the bug I am getting an error when trying to repair a small json file with one single issue: a missing ']'
To Reproduce Just run the following code
from json_repair import repair_json str = ''' { "resourceType": "Bundle", "id": "1", "type": "collection", "entry": [ { "resource": { "resourceType": "Patient", "id": "1", "name": [ {"use": "official", "family": "Corwin", "given": ["Keisha", "Sunny"], "prefix": ["Mrs."}, {"use": "maiden", "family": "Goodwin", "given": ["Keisha", "Sunny"], "prefix": ["Mrs."]} ] } } ] } ''' repair_json(str, skip_json_loads=True)
Observations The problem seems to be the fact that "name" is made of two dicts. If you remove the second entry, and simply input
"name": [ {"use": "official", "family": "Corwin", "given": ["Keisha", "Sunny"], "prefix": ["Mrs."} ]
seems to work
Describe the bug I am getting an error when trying to repair a small json file with one single issue: a missing ']'
To Reproduce Just run the following code
Observations The problem seems to be the fact that "name" is made of two dicts. If you remove the second entry, and simply input
seems to work