Part 3 · Section 07

Serialization and Deserialization

A dictionary in memory is a web of objects connected by references. The moment you want to save it to disk, send it over a network or hand it to a program written in another language, that web has to be flattened into a sequence of bytes or characters: it has to be serialized. The reverse step, rebuilding objects from that sequence, is deserialization (together they’re often called marshalling). It sounds mechanical, but the details decide what survives the round trip, what gets silently changed, and whether loading data can hurt you.

In this section you’ll learn:

Lectures

  1. 01Pickling✓
  2. 02JSON Serialization✓
  3. 03Custom JSON Encoding✓
  4. 04Custom Encoding using JSONEncoder✓
  5. 05Custom JSON Decoding✓
  6. 06Using JSONDecoder✓
  7. 07JSONSchema✓
  8. 08Marshmallow✓
  9. 09YAML✓
  10. 10Serpy✓

Practice: quiz & exercises

12 quiz questions · 4 coding exercises

Go to practice →