Write a program to Convert dictionary to JSON


Topic: Write a program to Convert dictionary to JSON

Solution

import json
person_dict = {'name': 'Bob',
'age': 12,
'children': None
}
person_json = json.dumps(person_dict)
print(person_json)



List all Python Programs