源代码
import json # a Python object (dict): x = { "name": "Bill", "age": 63, "city": "Seatle" } # convert into JSON: y = json.dumps(x) # the result is a JSON string: print(y)
运行结果