Data Formats
JSON and CSV: shape, rules and conversion.
Data Formats is taught here in 14 lessons, running from JSON basics through to Validating and testing data pipelines. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | Computer Science Fundamentals |
| Lessons | 14 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: Hashing & Checksums |
Lessons
- JSON basicsThe shape of JSON, how it maps to language types, and the easy mistakes that produce invalid JSON.
- CSV vs JSONWhen a flat table beats nested documents, and how to convert between them safely.
- CSV in depth: quoting, delimiters and Excel trapsRFC 4180 in practice — quoted fields, doubled quotes, embedded newlines — plus the BOM, delimiter and locale quirks that break real spreadsheet exports.
- YAML for configurationBlock and flow styles, the type-inference surprises that turn version numbers into floats, anchors and aliases, multi-document files, and the indent rules that cost hours.
- TOML and INI filesSections, dotted keys, typed values and arrays without ambiguity, plus why TOML replaced INI for tooling config and how to migrate a file between them.
- Line-delimited data: NDJSON and log formatsOne JSON object per line for streaming pipelines, plus the logfmt, Apache and syslog shapes you will actually parse, and how to survive a half-written line.
- Schema definition and validationJSON Schema keywords from required to oneOf, how to avoid the composition traps, Avro schema basics, and wiring validation into CI so bad data never reaches production.
- Tabular formats: TSV, Parquet, Arrow and AvroRow versus columnar storage, how Parquet gets its speed from encoding and predicate pushdown, what Arrow changes in memory, and when Avro is the right record format.
- Binary formats: Protocol Buffers, MessagePack, CBOR and BSONField tags instead of names, how schema evolution stays compatible, where MessagePack and CBOR fit, what BSON adds for MongoDB, and real numbers on size and speed.
- Converting between formats with jq, yq and csvkitReshape JSON with jq, convert YAML and TOML with yq, and turn CSV into queryable tables with csvkit and miller — the pipelines that replace a throwaway script.
- Dates, numbers and encoding pitfalls across formatsWhy dates should be strings or epochs but never both, how big integers and floats lose precision in JSON, and the null, bytes and Unicode differences between formats.
- Choosing a format: size, speed, readability and toolingA decision table that maps real requirements to a concrete format, plus the factors that actually change the answer — schema evolution, human editing and ecosystem support.
- Data interchange in APIs: negotiation and versioningContent-Type and Accept negotiation, envelope versus bare payloads, how to version a format without breaking clients, and an error contract worth keeping.
- Validating and testing data pipelinesFixture files, round-trip and property tests, schema drift detection, a malformed-input suite, and the metrics that catch bad data before a customer does.
More in Computer Science Fundamentals
Algorithms Data Structures Computer Networks Operating Systems Character Encodings Hashing & Checksums Dates & Time Regular Expressions
FAQ
How long does the Data Formats course take?
It has 14 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for Data Formats?
Not strictly. It helps to have read Hashing & Checksums first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after Data Formats?
Continue with Dates & Time (14 lessons), the next course in Computer Science Fundamentals.