I have JSON files, which contains two dictionaries, which are not separated by any delimiter. I need to get each of those dictionaries as individual JSON objects. How can I go about doing this? I am working in Python.
The files looks like
{"data":[[], [], ...., []]}{"data":[[], [], ..., []]}
The file could contains like 10K inner arrays.
I tried reading the file in line format, as I saw in a few solutions here and there but none of them are working.
data = json.load(f)
gives me the error
json.decoder.JSONDecodeError: Extra data: line 1 column 115451 (char 115450)
I also tried
data = []
with open('data.json', 'r') as f:
for line in f:
data.append(json.loads(line))
but it gives me the same error,
json.decoder.JSONDecodeError: Extra data: line 1 column 115451 (char 115450)