Serialize and deserialize data to and from JSON format.
Source Code
import json
data = {"name": "John", "age": 30, "city": "New York"}
json_data = json.dumps(data)
print(json_data)
data_back = json.loads(json_data)
print(data_back)
Serialize and deserialize data to and from JSON format.
import json
data = {"name": "John", "age": 30, "city": "New York"}
json_data = json.dumps(data)
print(json_data)
data_back = json.loads(json_data)
print(data_back)