Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Programming languages

Data Formats (JSON, YAML, TOML, XML, CSV)

Read, write, validate, query and convert JSON, YAML, TOML, XML and CSV, with what each parser really does shown by examples that run.

48 lessons to read 11 modules

48 lessons: 48 free with Pro answers.

Examples run with Node.js 24.21.0, quickjs 0.32.0, Python 3.14.8, Pyodide 314.0.7, Ruby 4.0.7 and sql.js 1.14.2.

Who it is for

Developers, testers, data and DevOps engineers and students who read, write, validate, query, transform or secure JSON, YAML, TOML, XML and CSV.

What you will be able to do

  • Choose a data format for a job, and read and write its text with the right encoding, byte-order mark and line endings
  • Parse and write JSON in JavaScript and Python without losing numbers, keys, dates or types
  • Validate documents with JSON Schema 2020-12 and query them with JSONPath, jq, JMESPath and SQL
  • Write YAML and TOML configuration that every parser reads the same way, and load it safely
  • Parse XML safely, use namespaces and schemas, and query and transform it with XPath, XSLT and XQuery
  • Read and write real-world CSV, including spreadsheet exports, and keep exports safe from formula injection
  • Convert, stream and evolve data across formats, and compare text formats with binary ones
  • Lint, format and diff data files in CI, and answer data-format questions in interviews and reviews

Revise and practise

Modules and lessons

What the labels mean

Free lesson, Pro answers
the whole lesson is free; the model answers to its interview questions open with a pass
Pro
opens with a Pro, Premium or Ultimate pass

Minutes are reading time.

What a pass opens in this track

97 interview answers. The same pass opens every other track and every Pro tool.

  1. Module 1

    Foundations: choosing formats and handling text

    What separates JSON, YAML, TOML, XML and CSV, which job each fits and which specification governs it, and how to read their text safely: encodings, byte-order marks and line endings.

    1. Choosing a data format: JSON, YAML, TOML, XML, CSV Beginner Free lesson, Pro answers: 20 minutes
    2. UTF-8, BOMs and line endings in data files Beginner Free lesson, Pro answers: 15 minutes
  2. Module 2

    JSON in depth

    The JSON grammar and data model, parsing and writing it in JavaScript and Python, numbers and precision, interoperability traps, variants, JSON Pointer and Patch, and canonical JSON.

    1. JSON syntax and data model (RFC 8259) Beginner Free lesson, Pro answers: 15 minutes
    2. Parse and serialise JSON in JS and Python Beginner Free lesson, Pro answers: 15 minutes
    3. Numbers: precision, big integers and decimals Intermediate Free lesson, Pro answers: 15 minutes
    4. JSON interop: duplicates, key order, I-JSON Intermediate Free lesson, Pro answers: 15 minutes
    5. JSON Lines, JSONC, JSON5 and other variants Intermediate Free lesson, Pro answers: 20 minutes
    6. JSON Pointer, JSON Patch and Merge Patch Intermediate Free lesson, Pro answers: 20 minutes
    7. Canonical JSON (RFC 8785) and signatures Advanced Free lesson, Pro answers: 15 minutes
  3. Module 3

    JSON Schema 2020-12

    A first schema, objects and arrays, composition and conditionals, $ref and reuse, formats and vocabularies, and how drafts, OpenAPI and generated code relate.

    1. Your first JSON Schema 2020-12 Beginner Free lesson, Pro answers: 20 minutes
    2. Objects and arrays in JSON Schema Intermediate Free lesson, Pro answers: 20 minutes
    3. Composition and conditionals in JSON Schema Intermediate Free lesson, Pro answers: 15 minutes
    4. JSON Schema $ref, $defs, $id and $dynamicRef Advanced Free lesson, Pro answers: 15 minutes
    5. JSON Schema formats, vocabularies and validators Advanced Free lesson, Pro answers: 15 minutes
    6. Drafts, OpenAPI and code from JSON Schema Advanced Free lesson, Pro answers: 15 minutes
  4. Module 4

    Querying JSON: JSONPath, jq, JMESPath and SQL

    JSONPath (RFC 9535) selectors, filters and functions, and the same questions asked with jq, JMESPath and the JSON functions of SQL.

    1. JSONPath (RFC 9535): selectors and segments Beginner Free lesson, Pro answers: 25 minutes
    2. JSONPath filters, comparisons and functions Intermediate Free lesson, Pro answers: 20 minutes
    3. jq, JMESPath and SQL JSON paths compared Intermediate Free lesson, Pro answers: 25 minutes
  5. Module 5

    YAML 1.2 and its traps

    Mappings, sequences and scalars, block scalars, tags and schemas, the type-coercion traps, anchors and merge keys, and loading and editing YAML safely.

    1. YAML essentials: mappings, sequences, scalars Beginner Free lesson, Pro answers: 15 minutes
    2. Multi-line strings: YAML block scalars Beginner Free lesson, Pro answers: 15 minutes
    3. YAML tags and schemas: failsafe, JSON, core Intermediate Free lesson, Pro answers: 15 minutes
    4. YAML type traps: Norway, octal, sexagesimal Intermediate Free lesson, Pro answers: 15 minutes
    5. YAML anchors, aliases and merge keys Intermediate Free lesson, Pro answers: 15 minutes
    6. Safe YAML loading and comment-safe edits Advanced Free lesson, Pro answers: 15 minutes
  6. Module 6

    TOML 1.1 and other configuration formats

    TOML tables and arrays of tables, what TOML 1.1 changed and where parsers differ, pyproject.toml and Cargo.toml, and INI, .env and HCL.

    1. TOML essentials: tables and arrays of tables Beginner Free lesson, Pro answers: 15 minutes
    2. TOML 1.1, dates, integers and parsers Intermediate Free lesson, Pro answers: 20 minutes
    3. TOML in practice: pyproject.toml and Cargo.toml Intermediate Free lesson, Pro answers: 15 minutes
    4. Other config formats: INI, .env and HCL Beginner Free lesson, Pro answers: 15 minutes
  7. Module 7

    XML 1.0: syntax, namespaces, parsing, security, schemas and signatures

    Well-formed XML, namespaces, tree and streaming parsers, parsing with external entities off, XSD validation, XML you meet every day, and canonical XML with signatures.

    1. XML syntax and well-formedness Beginner Free lesson, Pro answers: 20 minutes
    2. XML namespaces without confusion Intermediate Free lesson, Pro answers: 15 minutes
    3. Parsing XML: trees, events and streaming Intermediate Free lesson, Pro answers: 20 minutes
    4. Safe XML parsing: external entities off Advanced Free lesson, Pro answers: 15 minutes
    5. Validating XML with XSD 1.0 and 1.1 Intermediate Free lesson, Pro answers: 25 minutes
    6. XML you meet daily: sitemaps, feeds, SVG, OOXML Intermediate Free lesson, Pro answers: 25 minutes
    7. XML canonicalisation and digital signatures Advanced Free lesson, Pro answers: 20 minutes
  8. Module 8

    XPath, XSLT and XQuery

    XPath paths, axes and predicates, XPath 3.1 maps and arrays, XSLT templates and the identity transform, XSLT 3.0 and JSON output, and XQuery FLWOR expressions.

    1. XPath 1.0: paths, axes and predicates Beginner Free lesson, Pro answers: 25 minutes
    2. XSLT fundamentals: templates and identity Intermediate Free lesson, Pro answers: 20 minutes
  9. Module 9

    CSV and tabular text

    CSV by RFC 4180 and its dialects, messy real-world files and spreadsheet exports, formula injection in exports, and typed CSV with CSVW and Table Schema.

    1. CSV by the book: RFC 4180 and dialects Beginner Free lesson, Pro answers: 20 minutes
    2. Messy CSV: Excel, encodings and Indian formats Intermediate Free lesson, Pro answers: 20 minutes India-specific
    3. Safe CSV exports and formula injection Intermediate Free lesson, Pro answers: 15 minutes
    4. Typed CSV: CSVW metadata and Table Schema Advanced Free lesson, Pro answers: 20 minutes
  10. Module 10

    Across formats: time, conversion, streaming, evolution, binary

    Dates and times in every format, converting without losing data, streaming files too large for memory, changing a format safely, and binary formats such as CBOR and Parquet.

    1. Dates and times across data formats Intermediate Free lesson, Pro answers: 20 minutes
    2. Converting between formats without losing data Intermediate Free lesson, Pro answers: 20 minutes
    3. Streaming large JSON, XML and CSV files Advanced Free lesson, Pro answers: 15 minutes
    4. Schema evolution: change formats safely Advanced Free lesson, Pro answers: 15 minutes
    5. Beyond text: CBOR, MessagePack, Protobuf, Parquet Intermediate Free lesson, Pro answers: 15 minutes
  11. Module 11

    Tooling, reviews and interviews

    Linting, formatting and diffing data files in CI, and the data-format questions that come up in interviews and code reviews, answered in full.

    1. Lint, format and diff data files in CI Intermediate Free lesson, Pro answers: 30 minutes
    2. Data-format questions for interviews and reviews Intermediate Free lesson, Pro answers: 20 minutes

Related tools

Official documentation

More in Programming languages

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.