unhashable type: dict with test JSON
The reason your first example doesn't work is that each 'child' key has a dictionary declared as it's value instead of a list, as it looks like you intended. Replace the {
with [
and it will work.
'child': {
{'kid1':'one'},
{'kid2':'two'},
{'kid3':'three'},
},
Should be:
'child': [
{'kid1':'one'},
{'kid2':'two'},
{'kid3':'three'},
],
In other words, you're saying 'child' is a dictionary without giving a dictionary.