ExitSerialization versus JSON1 / 7
Explanationassociate7 steps · 3 exercises

Serialization is an action; JSON is a format

Why serialization is an operation and JSON is one possible representation, so a payload can be valid JSON without matching the receiver’s contract.

Serialization turns a value in your program into a representation you can send or store. Deserialization reads that representation back into usable values. These are operations: they describe what your code does.

JSON is one format those operations can use. For example, a JSON serializer can turn an in-memory record into the text {"quantity":2}. The serializer does the work; JSON defines what the resulting text looks like. The same record could be serialized as CSV for a tabular import, but a receiver that expects JSON cannot read those CSV bytes with a JSON parser.

Next up: Sort the statements on what you just read.