【发布时间】:2014-02-28 21:23:36
【问题描述】:
我在 Python 中这样创建了一个嵌套字典:
{
"Laptop": {
"sony": 1
"apple": 2
"asus": 5
},
"Camera": {
"sony": 2
"sumsung": 1
"nikon" : 4
},
}
但我不知道如何将这个嵌套的 dict 写入 json 文件。任何 cmets 将不胜感激..!
【问题讨论】:
标签: python json dictionary nested