JSON Module

The json module provides tools for working with the JavaScript Object Notation (JSON) format. It can be imported with the following line:

import json

The following functions are provided by this module:

JSON Module

.dump()
Encodes a Python object as a JSON file.
.load()
Decodes a JSON file and returns a Python object.
Interested in helping build Docs? Read the Contribution Guide or share your feedback.

Learn Python on Codecademy