Q:

Convert the following dictionary into JSON format using python programming

0

Convert the following dictionary into JSON format

data = {"key1" : "value1", "key2" : "value2"}

Expected Output:

data = {"key1" : "value1", "key2" : "value2"}

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Solution:

import json

data = {"key1" : "value1", "key2" : "value2"}

jsonData = json.dumps(data)
print(jsonData)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now