Json
The Python json module is a standard-library module for encoding Python objects as JSON and decoding JSON into Python objects.
A Pythonic Adventure: From Python basics to a working web app
The Python json module provides functions for encoding Python data structures as JSON and decoding JSON into Python values.
- How it is used
- Uses JSON to save structured coffee-shop orders and reload them later.
- How deep it goes
- Demonstrates importing json, dumping dictionaries or lists, formatting output, reading files, and recovering saved values.
- Examples
- Uses coffee orders, orders.json, multiple order dictionaries, and formatted JSON output.
- What you can do after
- Builds a small workflow that writes Python order data to JSON and reads it back.
Read how A Pythonic Adventure: From Python basics to a working web app explains json →
The Quick Python Book, Fourth Edition
JSON is a Python library for encoding and decoding JSON data.
- How it is used
- Handles structured data exchanged through APIs and other networked data workflows.
- How deep it goes
- Explains JSON structures, type mappings, decoding, encoding, pretty printing, and newline-delimited records without covering parser internals.
- Examples
- Uses weather and Chicago API responses, nested temperature lookup, pretty printing, JSON files, and newline-delimited weather records.
- What you can do after
- Apply JSON via Python’s json module to decode API responses, inspect nested values, and read or write JSON files.
Read how The Quick Python Book, Fourth Edition explains json →
Python Workout: 50 ten-minute exercises
The Python standard-library json module serializes Python objects to JSON and parses JSON into Python objects.
- How it is used
- Processes JSON files and exchanges data between JSON-formatted strings and Python data structures.
- How deep it goes
- Explains load, loads, dump, file selection, and nested data organization through a multi-file statistics exercise.
- Examples
- Uses class score files containing subject dictionaries and demonstrates minimum, maximum, and average summaries.
- What you can do after
- Apply it via json.load and json.loads to read JSON, organize records, and analyze multiple files.
Read how Python Workout: 50 ten-minute exercises explains json →
Python Workout, Second Edition
The json module is Python's standard-library module for encoding Python objects as JSON and decoding JSON into Python objects.
- How it is used
- Processes JSON files and exchanges data between Python programs and web services or APIs.
- How deep it goes
- Explains load, loads, dump, file discovery, and nested aggregation through a multi-file score-analysis exercise.
- Examples
- Uses class score files containing arrays of subject dictionaries and summarizes each subject’s minimum, maximum, and average.
- What you can do after
- Builds a multi-file JSON score analyzer using json.load, glob, nested dictionaries, and aggregate calculations.
Related concepts
- JSONuses · JSON is a standardized, language-independent text format for representing structured data using objects, arrays, strings, numbers, Boolean values, and null.
- json.loadhas part · json.load() is a Python function that reads and parses JSON from a file-like object into the corresponding Python value.
- json.dump()has part · json.dump() is a Python standard-library function that serializes a Python object as JSON and writes the result to a file-like object.
- json.loads()used by · json.loads() is a Python function that parses JSON data from a string, bytes object, or bytearray and returns the corresponding Python object.
- deserializationuses · Deserialization is the process of reconstructing structured data or in-memory values from a serialized representation.
- data formatkind of · A data format is a defined representation, structure, and encoding scheme for storing, transmitting, exchanging, or interpreting data.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



