DeveloperBreeze

JSON Serialization and Deserialization

import json

# Dictionary representing data
data = {'name': 'John', 'age': 30, 'city': 'New York'}

# Serialize (convert to JSON)
json_string = json.dumps(data)

# To parse JSON data (deserialize)
parsed_data = json.loads(json_string)

Continue Reading

Handpicked posts just for you — based on your current read.

Discussion 0

Please sign in to join the discussion.

No comments yet. Start the discussion!