Last updated 6 years ago
Was this helpful?
JSON 是一种数据格式。
最准确又简洁的介绍:
标准的 JSON 库可以把 JSON 类型和 Python 类型相互转换
import json json_string = json.dumps([1, 2, {"foo": true, "bar": None}]) json.loads(json_string)
response = requests.get("http://some.website.com/data.json") response.json()
API -- 应用程序编程接口(Application Programming Interface)的缩写。
很多网站提供了基于 JSON 和 HTTP 的 API,你可以通过阅读文档,学习其 API 的使用方法。