Your json is not valid, your errors are:
- you have an extra bracket, it shouldn't be there;
- you are using single quotes, instead you should use double quotes;
- and you are missing commas at the end of each row.
Pay attention on your errors here:
[
{
'address': 'Bramalea, L6T 0E2' <-- missing comma and using single quotes
'type': 'home' <-- using single quotes
},
{
'address': 'A, 46 Peel Drive, ASDF23' <-- missing comma and using single quotes
'type': 'office' <-- using single quotes
}
} <---- extra bracket here
]
It should be like this:
[
{
"address": "Bramalea, L6T 0E2",
"type": "home"
},
{
"address": "A, 46 Peel Drive, ASDF23",
"type": "office"
}
]
Here is the final result for json.loads(data)
with the correct json:
[{u'type': u'home', u'address': u'Bramalea, L6T 0E2'}, {u'type': u'office', u'address': u'A, 46 Peel Drive, ASDF23'}]