如何用Python解析Json文件

如题所述

import json
s = json.loads('{"name":"test", "type":{"name":"seq", "parameter":["1", "2"]}}')
print s
print s.keys()
print s["name"]
print s["type"]["name"]
print s["type"]["parameter"][1]
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答