一品网
  • 首页

python3 dict 写入json


python3 dict 写入json

from collections import defaultdict, OrderedDict
import json

test_dict = {
    'version': "1.0",
    'results': video,
    'explain': {
        'used': True,
        'details': "this is for josn test",
  }
}

json_str = json.dumps(test_dict, indent=4)
with open('test_data.json', 'w') as json_file:
    json_file.write(json_str)


python3Json

相关


sql server2016里面的json功能 - 转

python3中的bytes数据类型及其用法

[转]Vue-cli3.x引入本地json报404 解决方案

Ubuntu中使用Python3 Jupyter

sublime text build system automatic ctrl/cmd+B自动选择 python2 或 python3

Python3+Robot Framework环境搭建

JSON Web Token 是什么?

com.alibaba.fastjson把JSONObject转换为Map<String, Object>对象或者List<String> 对

json拼接

Rest接口报错 Content type ‘application/json;charset=UTF-8‘ not supported

JSON 与 XML 的学习

Springboot通过Converter和JsonDeserializer自定义web入参

标签

一品网 冀ICP备14022925号-6