dfdh 发表于 2015-12-1 15:31:40

python学习笔记十六:读取JSON文件

  读取JSON文件可以用JSON库,示例代码:



#coding:utf-8
import json
with open("msg.json") as jsonfile:
json_data = json.load(jsonfile)
for key in json_data:
val = json_data
print key + '\t' + val
  
页: [1]
查看完整版本: python学习笔记十六:读取JSON文件