Python JSON: Convert Python object to JSON data
Write a Python program to convert Python object to JSON data.
Sample Solution:-
Python Code:
Output:
<class 'dict'> {"name": "David", "class": "I", "age": 6}
Flowchart:

Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a Python program to convert JSON data to Python object.
Next: Write a Python program to convert Python objects into JSON strings. Print all the values.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics