Home / Python Tips Generated By ChatGPT / Reading and Writing JSON Data in Python Use the json module to serialize and deserialize JSON data. Source Code import json data = {"name": "John", "age": 30} json_string = json.dumps(data) print(json_string) data = json.loads(json_string) print(data)