loads and dumps in JSON

From the JSON cheat sheet ยท Python ยท verified Aug 2026

loads and dumps

Convert between JSON text and Python values.

python
import json

data = json.loads('{"name":"Ana"}')
text = json.dumps(data)
๐Ÿ“Œ loads reads text and dumps produces text
๐Ÿ’ก ensure_ascii=False preserves readable Unicode
๐Ÿ” parse_float can preserve decimal precision
โš ๏ธ default handlers must return serializable values
pythonloadsdumps

Continue with JSON

Save the full cheat sheet or work through every related task.

More JSON tasks

Back to the full JSON cheat sheet