在Python中将数组转为Json数据存储时需要用到将json模块中的json.dumps()或者json.dump()方法。
·json.dumps()方法用法使用json.dumps( )方法将Python数组转为json格式数据# 导入json模块
import json
# 定义Python数组
py_list = [{'JavaEE': "http://java.itheima.com"},
{'HTML$JS+前端': "http://web.itheima.com"},
{'大数据': "http://cloud.itheima.com"},
{'Python': "http://python.itheima.com"},
{'人工智能': "http://ai.itheima.com"},
{'软件测试': "http://test.itheima.com"},
{'C++': "http://c.itheima.com"},
{'UI/UE设计': "http://ui.itheima.com"},
{'产品经理': "http://pm.itheima.com"},
{'Linux云计算+运维开发': "http://linux.itheima.com"},
{'新媒体+短视频直播运营': "http://java.itheima.com"},
{'拍摄剪辑': "http://movies.itheima.com"},
{'智能机器人软件开发':