python 中jsondumps得到的数据是什么格式列子
json.dumps得到的数据格式是一个字符串,其中包含一个JSON格式的对象或数组。
例如:
import json
data = {
'name': 'John',
'age': 30,
'city': 'New York'
}
json_string = json.dumps(data)
print(json_string)
输出结果:
{"name": "John", "age": 30, "city": "New York"}
原文地址: https://www.cveoy.top/t/topic/fkSG 著作权归作者所有。请勿转载和采集!