Serialisation formats · ten decisions
JSON · JSONC · JSON5 · YAML · TOML · .env
XML · Turtle · CSV · NDJSON
and the ones
that never get invited
Everything you have ever typed into a box was stored in a format somebody chose years before you typed it. What did that format decide you meant?
Not because the old names were wrong. Because spreadsheets kept changing them. A gene called SEPT2 would be opened in a spreadsheet and saved back as the second of September, and enough published research had been quietly corrupted this way that the naming committee gave up and changed the genes.
Nobody decided that. No person looked at SEPT2 and thought: that is a date. A program written years earlier had been told that anything shaped like a date is a date, and it was doing what it was told, at the moment it was told to open a file.
The same rule has a country in it. Norway's two-letter code is NO, and in one of the most widely used file formats in the world a bare NO is one of the ways of writing the word no. A list of countries can lose Norway and report no error at all.
The problem has a name among people who configure servers: the Norway problem. A deploy file
says region: NO. The service starts, and the region it starts in is false.
It asks you to decide things, and nothing further down appears until you have. That is deliberate: the cost of a decision is invisible until you have made it, and being told about it in advance does not work.
Each answer shows its own consequences and nobody else's. To see what another answer would have cost, change it; the page changes with you and keeps the answers you gave further down. The technical detail is folded away under each answer for anybody who wants it.
Here is a real kind of record: a single small object in a museum, written out the way a curator would put it on a card.
Eight facts, all of them ordinary. Six of them are about to be damaged by decisions you have not made yet. Look at them once more before we start: the accession number, the country, the weight, the registry number, the date and the note.
You have to write this down in a file a machine can read back later. The first thing to settle is the dullest and it decides everything after it: how does the file show where one fact stops and the next begins?
Nine more decisions follow, once you have settled the first one.