openskills.info
Course Preview

File Formats and Serialization

File formats define how information is arranged in files or messages. Serialization turns in-memory data into that arranged representation so another program, machine, or later process can reconstruct and interpret it.

itComputer fundamentals

Don't Panic -- File Formats and Serialization

A file format is a set of rules for representing information as bytes. Serialization converts in-memory values into that representation. Deserialization reverses the conversion. The terms overlap, but they are not the same: a format describes the representation, a serializer implements the conversion, and a schema describes the expected structure.

The thing that surprises most people is how many layers sit between your application values and the bytes on disk. A value passes through a data model, a serializer, character encoding, file or network transport, a parser, and schema and application validation. Every layer can fail independently, and a parse success proves syntax, not meaning. A negative count can be perfectly valid JSON while being invalid for an inventory system.

Three ideas everything else hangs off: the data model is the real contract, not the syntax -- two formats can share similar trees while disagreeing on duplicates, ordering, numeric ranges, and null. Identification is layered -- a filename extension is a hint, a media type is protocol metadata, and a schema identifier selects the structure. Compatibility always has a direction -- a new reader accepting old data is backward compatibility, and an old reader accepting new data is forward compatibility, and teams routinely reverse the labels.

The blind spot is that text begins as bytes before the parser ever runs. A character encoding mismatch damages text before schema validation starts. JSON exchanged between open systems uses UTF-8. XML defines encoding declarations and detection rules. If your logs show garbled characters before any parse error, the problem is at the encoding layer, not the format layer.

Read next: The Slides tab covers the layered contract in a visual format. The Cheatsheet tab has the selection matrix, evolution rules, and parser boundary controls. The Field Notes tab carries practical judgment on format selection, YAML's implicit typing traps, and where schema validation catches real bugs.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources