Reputation: 1139
This is how my file look like:
My code
import json
with open(r'c:\sample.json') as json_file:
data = json.load(json_file)
And I got this error:
Extra data: line 18 column 2 (char 294)
What does it mean ? what extra data ?
Upvotes: 1
Views: 484
Reputation: 1306
The structure should look like this:
[
{
"bat":"0",
...
},
{
"bat":"0",
...
},
]
Upvotes: 1
Reputation: 927
a json file can only be one data structure, if you want to put multiple dicts in it, then you can put them in a list
[
{...},
{...},
...
]
Upvotes: 2