liveBook · Manning

Json

The Python json module is a standard-library module for encoding Python objects as JSON and decoding JSON into Python objects.

How 4 Manning books explain it

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.

Read how Python Workout, Second Edition explains json →

Related concepts

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.