Three learners review open books together at a classroom table, with stacks of textbooks, stationery and a whiteboard in the bright room.

Data Serialisation and File Formats | JSON, CSV, Parquet, Avro, Encoding, Compression and Interchange

Data serialisation is the process of converting structured information into a representation that can be stored, transmitted or reconstructed later. File formats define how that representation is organised so different systems can read the same bytes with the same intended meaning.

A format is not merely a container. It is a contract between the writer of data and every future reader that must reconstruct the intended structure.

Formats sit at the boundary between data and software. A table may become CSV, JSON, Parquet or another representation. Each choice changes portability, precision, speed, schema control, compression, streaming behaviour and long-term readability. Good data management therefore treats format choice as an architectural decision, not an export afterthought.

ARTICLE ID: DATA.MANAGEMENT.043
Canonical function: data representation for storage, transport and machine interoperability
Owner boundary: this article owns serialisation, encoding and file-format trade-offs. Data Integration and Interoperability owns system-to-system exchange; Data Contracts and Data Products owns producer–consumer promises; Data Lakes and Lakehouses owns analytical object-storage architecture.

The Simple Answer

A serialisation route is:

Logical Data → Schema → Encoding Rules → Bytes / Text → Storage or Transport → Reader → Decode → Validate → Reconstruct Logical Data

Trust depends on both sides agreeing about the format and enough schema or metadata surviving to reconstruct meaning correctly.

Logical Data vs Physical Representation

A customer record with ID, name and balance is a logical structure. CSV, JSON and Parquet are different physical representations of that structure.

Changing format does not automatically change business meaning, but some formats preserve types and relationships better than others.

Text Formats

Text formats are human-readable or semi-readable representations built from characters.

They are easy to inspect and exchange, but may be verbose and can leave type interpretation to the reader.

Binary Formats

Binary formats encode data into machine-oriented byte structures. They can preserve types more compactly and support faster parsing or richer schemas.

Examples include Avro-style row formats, Protocol Buffers-style messages and columnar analytical formats such as Parquet.

CSV

CSV is simple, widely supported and excellent for flat tabular interchange. Its strengths are also its limits.

CSV Is More Ambiguous Than It Looks

A value such as 01/02/03 can be interpreted as text or several possible dates. 00123 may be an identifier that must preserve leading zeros rather than an integer.

A CSV file should therefore travel with a schema or data dictionary when types matter.

Delimiter and Quoting Rules

CSV fields can contain commas, quotes and line breaks. Producers and consumers must agree on escaping and quoting rules.

Naive splitting on commas can corrupt legitimate text.

Headers

Header names help identify columns but do not fully define them. A column named amount still needs unit, currency, nullability and semantic definition.

JSON

JSON represents objects, arrays, strings, numbers, booleans and nulls. It is widely used in APIs and event systems because it is flexible and easy to inspect.

JSON can represent nested data naturally, but its flexibility means schema discipline must come from contracts or validation rather than the syntax alone.

JSON Numbers

Numeric interpretation can differ between languages and runtimes, especially for very large integers and decimal precision.

Financial or scientific values may need explicit string, decimal or schema conventions to avoid precision loss.

Dates in JSON

JSON has no dedicated universal date type. Dates are commonly represented as strings under an agreed convention.

The contract should state timezone, precision and whether the value represents event time, effective time or another clock.

Null vs Missing

In many serialised structures, an absent field and a field explicitly set to null can mean different things.

The producer–consumer contract should state whether missing means “unknown”, “not applicable”, “default value” or “not supplied”.

XML

XML supports nested structure, namespaces, attributes and formal schemas. It remains important in many standards-heavy and enterprise domains.

Its verbosity can be a disadvantage for high-volume data, but explicit namespaces and mature schema tooling can be valuable in complex interchange.

Row-Oriented Formats

Row-oriented representations store the fields of one record together. They are well suited to message transport, event logs and workloads that read complete records.

Avro-style serialisation is a common example of schema-aware row representation used in data pipelines.

Columnar Formats

Columnar formats store values from the same column together. Analytical queries often read only a small subset of columns across many rows, making columnar layout efficient for scan-heavy workloads.

Parquet is a widely used example in analytical data estates.

Why Parquet Works Well for Analytics

Parquet is less convenient than JSON for small human-inspected messages. Format selection should follow the job.

Avro-Style Schema-Aware Records

Schema-aware row formats can separate the schema from the encoded records and support controlled schema evolution.

This is useful in event and streaming environments where messages must remain compact while old and new consumers coexist.

Schema Evolution

Serialised data can outlive the software version that created it. Schema evolution therefore matters.

Compatibility should be tested against real consumers and historical files.

Backward Compatibility

Backward compatibility generally means a newer reader can interpret older data.

This matters when historical records remain in storage for long periods.

Forward Compatibility

Forward compatibility generally means an older reader can tolerate data written under a newer schema.

This is useful during rolling upgrades where not every consumer updates at once.

Semantic Compatibility

A schema can remain technically compatible while meaning changes. A field called status can keep the same string type while its allowed values or business interpretation changes.

Technical schema compatibility cannot replace semantic governance.

Schema Registries

A schema registry stores versions of message or record schemas and can enforce compatibility rules before new producers deploy.

Registries are especially useful for streaming and shared interfaces, but the business meaning of fields still needs documentation and ownership.

Character Encoding

Text becomes bytes through character encoding. UTF-8 is widely used because it can represent Unicode text efficiently and interoperably.

If the reader assumes the wrong encoding, characters can become corrupted even when the original bytes were transmitted correctly.

Unicode Normalisation

Visually identical text can sometimes have different underlying Unicode sequences. Normalisation can improve matching and deduplication.

Normalisation should be applied carefully where exact original representation matters.

Byte Order

Some binary numeric encodings depend on byte order. Modern libraries usually abstract this, but low-level interchange specifications should state endianness where relevant.

Compression

Compression reduces storage and transfer size.

Compression should be evaluated alongside CPU cost, random access and splittability for parallel processing.

Compression Is Not Encryption

Compressed data is still readable by anyone who can decompress it. Compression does not provide confidentiality.

Splittable Formats

Large analytical files can be processed more efficiently when different workers can read independent blocks without scanning from the beginning.

Splittability matters for distributed processing.

Record Boundaries

Line-delimited formats create explicit record boundaries, which can simplify streaming and parallel ingestion.

A single enormous JSON array may be harder to process incrementally than one JSON object per line.

Self-Describing Formats

Some formats carry field names or schema metadata with the data. This improves portability but increases size.

Other formats rely on an external schema, producing smaller messages but stronger dependence on schema governance.

Human Readability vs Machine Efficiency

Human-readable formats are excellent for debugging, teaching and simple interchange. Machine-efficient formats reduce cost and latency at scale.

Many estates use both: JSON at APIs, Parquet in analytics, CSV for simple exports and schema-aware binary messages in streaming.

File Extensions Are Not Proof

A file named .csv may contain malformed or unexpected content. A robust ingestion pipeline validates actual structure and, where appropriate, content type rather than trusting the filename alone.

Magic Bytes and Signatures

Some binary formats begin with identifying byte sequences. These can support format detection, though they do not prove the file is safe or semantically correct.

File-Level Metadata

Useful metadata can include:

This metadata improves validation and lineage.

Checksums

Checksums help detect corruption during transfer or storage.

A checksum should be calculated over a defined representation. Reformatting equivalent JSON can change the bytes and therefore the checksum even if logical content remains equivalent.

Canonical Serialisation

Some systems need a deterministic canonical representation so logically equivalent data produces the same byte sequence for signing, hashing or comparison.

Canonicalisation rules should be explicit because ordinary serializers may vary field order or whitespace.

Decimal Precision

Financial and scientific data often require exact decimal semantics. Binary floating-point representations can introduce small approximations.

The format and schema should state precision and scale where exact decimal behaviour matters.

Units

A number without a unit is incomplete when the domain depends on measurement. Formats rarely solve this by themselves.

Units belong in schema, metadata or semantic contracts.

Enumerations

Enumerated codes need controlled definitions. A code 3 has no meaning without a reference vocabulary and version.

See Master Data and Reference Data.

Nested Data

JSON and some binary or columnar formats represent nested arrays and objects naturally. Flattening nested data into CSV can duplicate parent values or require multiple related files.

The best representation depends on whether hierarchy is central to the receiver’s job.

Wide vs Long Representations

The same logical data can be represented in wide or long form. Wide tables use many columns; long tables use repeated attribute rows.

Format choice should preserve the model expected by downstream tools rather than forcing arbitrary transformations at every handoff.

File Size and Partitioning

Thousands of tiny analytical files can create more metadata overhead than a smaller number of well-sized files.

One enormous file can make parallel processing and selective access inefficient. File sizing is an operational trade-off.

Long-Term Preservation

For long-lived data, prefer formats with durable specifications, broad tooling and enough metadata to reconstruct meaning later.

Proprietary formats may still be necessary, but preservation planning should account for dependency on specific software.

Open Formats

Openly documented formats can reduce dependency on one vendor and support long-term interoperability.

Open specification alone does not guarantee quality, security or universal tool compatibility.

Data Exchange

When data crosses organisational boundaries, the exchange package should include more than a file:

APIs and Serialisation

APIs frequently use JSON or binary message formats. The interface contract should define the representation and compatibility behaviour.

See Data APIs and Data Services.

Streaming and Serialisation

Streaming systems benefit from compact, schema-aware formats where millions of messages may be exchanged continuously.

Historical consumers may replay old messages, so schema evolution is especially important.

See Data Streaming and Event-Driven Systems.

Lakehouse Formats

Lakehouses commonly use columnar files beneath table metadata because analytical readers benefit from efficient scans and typed schemas.

The file format stores data; the table abstraction manages snapshots, commits and schema evolution across files.

Security

File formats can contain embedded scripts, formulas, macros or external links. Ingestion should treat complex file types according to their security risk.

CSV and spreadsheet exports can also create formula-injection risks when opened in interactive tools if untrusted fields are interpreted as formulas.

Privacy

Changing format does not remove sensitivity. Converting a restricted table from a database into CSV usually makes it easier to copy, not safer.

Classification and access should follow the data, not the extension.

Validation

Validation should check both syntax and semantics:

Testing Format Evolution

Tests should include old files, new files, mixed-version consumers, unexpected nulls, large values, multilingual text, precision boundaries and corrupted records.

See Data Testing and Reliability Engineering.

Education Example

An education platform exports student attendance for analysis. A CSV version is suitable for a small controlled spreadsheet workflow, while a typed columnar version is used for long-term analytics. Both carry the same canonical field definitions and classification.

The identifier column is explicitly typed as text so leading zeros are not lost when opened in spreadsheet software.

Research Example

A research dataset uses a durable open tabular format plus a machine-readable schema, codebook, units and checksums. The representation is chosen so future researchers can reconstruct both values and meaning without the original laboratory software.

Common Failure Modes

A Format Selection Checklist

  1. What logical structure must be represented?
  2. Who will read the data?
  3. Is human readability important?
  4. Is the data flat or nested?
  5. Which types and precision must survive?
  6. How large is the dataset?
  7. Will it be streamed or batch processed?
  8. Is column pruning important?
  9. What compression is appropriate?
  10. How will schemas evolve?
  11. Are old readers expected to remain compatible?
  12. Which encoding applies?
  13. What metadata and checksums accompany the file?
  14. What security and privacy risks follow the format?
  15. Can a future reader reconstruct the intended data without hidden vendor knowledge?

A Maturity Ladder

  1. Exported: data can be written into files.
  2. Specified: encoding, delimiter and structure rules are documented.
  3. Typed: schemas preserve data types and constraints.
  4. Versioned: schema evolution is controlled.
  5. Validated: syntax, semantics and checksums are tested.
  6. Interoperable: formats fit APIs, streams and analytical systems intentionally.
  7. Preservable: long-lived representations have durable specifications and metadata.
  8. Adaptive: workload, tooling and receiver needs drive deliberate format evolution.

The Deeper Principle: Bytes Need a Shared Interpretation

Every stored or transmitted dataset eventually becomes bytes. Bytes alone are not meaningful. Meaning reappears only when a future reader has the rules required to reconstruct the intended structure, types, units, codes and relationships.

Good serialisation therefore preserves more than data values. It preserves the possibility that another system, another team or another decade can read the representation without silently inventing what the bytes were meant to mean.

Data Management Series


Final idea: serialisation is the discipline of making data reconstructible outside the memory of the system that created it. A good format carries enough structure and governance that moving the bytes does not destroy the meaning.

Explore the connected learning guides

Choose the question that brought you here. Open one useful guide, try a small task, and stop when you have what you need.

Take one question further

The same learning habit can travel across subjects, while each subject keeps its own methods. These routes help you notice a difficulty, understand one part of it, and return to something you can do.

A word is familiar, but using it is difficult.

Move from recognising a word to retrieving it in a new context. Understand vocabulary plateaus.

Try it without the guide: Choose one word you already know. Close the guide and use it in a new sentence. Explain why it fits; try another context tomorrow.

A piece of writing has ideas, but the reader loses the thread.

Make the order of events and the links between sentences clear. Explore composition writing.

Try it without the guide: Choose one short paragraph. Read the relevant explanation, close it, and revise the paragraph. Ask someone to tell you what happened and why.

The Mathematics seems familiar, but marks still disappear.

Find the first point where the working stops being reliable. Find Secondary 4 A-Math mark leakage.

Try it without the guide: For a Secondary 4 A-Math question you have attempted, locate the first uncertain line. Repair that step, then try a comparable question without the worked answer.

A Science fact is remembered, but the explanation is incomplete.

Connect the evidence to a scientific idea and the resulting change. Follow the Primary Science learning route.

Try it without the guide: Choose a familiar Primary Science example. Explain the evidence, the idea and the result without notes. Then change one condition and explain your prediction.

Two accounts of the world seem to disagree.

Check the question, source, date and evidence before combining claims. Explore the World Knowledge research library.

Try it without the guide: Take one claim. Find the source best placed to support it, note its date, and state what remains uncertain. Return to your original question.

There is plenty of help, but independence is hard to see.

Check what the learner can understand and do after support is removed. Understand how education works.

Try it without the guide: Choose one small task the child has practised. Agree on a calm, brief attempt without prompts. Use what happens to choose one next step, then stop.

For the structure behind these connections, read the eduKateSingapore runtime manifest and the eduKate ecosystem boot contract. The reader map describes public navigation; those manifests preserve the wider ownership and return rules.