Skip to main content
Loading page…
Python Mastery
Chapter 10
Lesson 3 of 4
JSON: Talking to the World
Contents
Notes
Tutor
Note
Bridge: json, pathlib, and tempfile Imports
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
28 min
9 activities
0 of 9 done
In this lesson
1
Bridge: json, pathlib, and tempfile Imports
2
What is JSON and Why Does It Matter?
3
Serializing and Parsing JSON
4
Reading and Writing JSON Files
5
Pitfall: JSONDecodeError on Invalid Input
6
Python Tuple in JSON
7
Practice: Config File Round-Trip
8
Explain the json.dumps / json.dump Distinction
9
Tip: Serializing Custom Objects
Objectives
Learner can serialize Python objects to JSON strings and files with json.dumps and json.dump
Learner can parse JSON strings and files with json.loads and json.load
Learner can configure pretty-printing with the indent parameter
Learner can handle JSONDecodeError gracefully and understand the Python-JSON type mapping
Chapter 10 · Files, JSON & CSV
Reading & Writing Files
Paths Done Right with pathlib
JSON: Talking to the World
CSV & Tabular Data
Previous: Paths Done Right with pathlib
Next: CSV & Tabular Data