Using python how can i convert json to array list
This question already has an answer here:
There is the json module in python:
import json
with open("input.json") as json_file:
data=json.load(json_file)
for key, value in data.items():
print("json key: ", key)
print("json value: ", str(value))
The json module will import the data into a python dict.
Actually this dict is already a tree-like datastructure. It doesn't offer the classical pointer to parents/children. But I think you will find the python for loops extremely comfortable, they are great for processing such data.
链接地址: http://www.djcxy.com/p/38046.html上一篇: 从Json收集一个值