python学习笔记十六:读取JSON文件
2015-02-05 14:34
696 查看
读取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[key] print key + '\t' + val
相关文章推荐
- python学习笔记之读取配置文件
- python核心编程学习笔记-2016-08-02-01-读取文件的函数中的文件指针问题
- python学习笔记之读取配置文件
- Head First Python 学习笔记-Chapter3:文件读取和异常处理
- python.json/pygal.maps.world学习范例-读取json格式文件、生成世界地图
- Head First Python 学习笔记-Chapter3:文件读取和异常处理
- python学习笔记(四)-文件的读取、写入和复制、剪切
- 【学习笔记】python读取json内容转换成excel格式
- Python学习笔记(十四)从文件中读取数据
- python学习笔记之读取配置文件
- python cookbook第三版学习笔记七:python解析csv,json,xml文件
- Python学习笔记 --- python实现修改json文件
- 我的python学习笔记、从文件中读取数据
- Python 创建、读取和写入文件以及yield关键字- 千月的python linux 系统管理指南学习笔记(14)
- Python 基础学习---读取json文件
- python3.4学习笔记(二十六) Python 输出json到文件,让json.dumps输出中文 实例代码
- Pythone OpenCV学习笔记之:视频文件读取与保存
- Python学习笔记(三):文件和目录工具
- C#学习笔记(十六):使用打开保存文件对话框
- python学习笔记——文件