我有一個JSON文件與字典一樣的物體轉換Json的字典對象到Python dicitonary
{"d1a": 91, "d1b": 2, "d1c": 1, "d1d": 5, "d1e": 7, "d1f": 77, "d1e": 999}
{"d2a": 1, "d2b": 2, "d2c": 3, "d2d": 4, "d2e": 5, "d2f": 6, "d2e": 7}
{"d3a": 1, "d3b": 2, "d3c": 3, "d3d": 4, "d3e": 5, "d3f": 6, "d3e": 7}
我打算將它轉換成一個Python字典格式相同
with open(myfile.json, 'r') as myfile:
# not sure how the conversion will start
的OBJ文件= [將在MYFILE線json.loads(線),似乎在JSON返回兩個條目,而不是原來的3文件 – jumpman8947
對不起,我的代碼中有一個額外的循環,它取出了一行。 – jumpman8947