I have a JSON file like below:
{
"name":"A",
"age":19
}
{
"name":"B",
"age":20
}
So basically the file contains a list of people.
I tried to use json.loads(str_content)
in Python 3, but it returned the error of json.decoder.JSONDecodeError: Extra data:
.
I checked with an online JSON parser (http://json.parser.online.fr) and it told me the same problem.
How to parse a JSON file without a root element but a list of JSON objects?