Write a program to convert dictionary into JSON


Topic: Write a program to convert dictionary into JSON

Solution

import json
data = {"key1" : "value1", "key2" : "value2"}
jsonData = json.dumps(data)
print(jsonData)



List all Python Programs