Source Code:
(back to article)
import json data = { "name": "John Smith", "age": 30, "city": "New York" } with open("data.json", "w") as outfile: json.dump(data, outfile)
Result:
Report an issue