import json
# 一个 Python 对象 (字典):
x = {
"name": "Bill",
"age": 63,
"city": "Seatle"
}
# 转换为 JSON:
y = json.dumps(x)
# 结果是一个 JSON 字符串:
print(y)