The best serialization formats, according to hackers
9 serialization formats recommended in Hacker News comments over the past year, ranked by how many separate people recommend each one.
- Most recommendedProtocol Buffers (protobuf)77 people recommend it
- Least regretAvro10 recommend, 2 criticize
All serialization formats
- Protocol Buffers (protobuf)Schema-based binary format with compatible changes, compact messages and generated code in many languages. Critics cite language design flaws and that messages need the schema to read.77recommend
- SerdeRust's default library for converting data to and from formats like JSON, praised for pleasant parsing. Critics mainly cite slow compile times from heavy code generation.22recommend
- Cap'n ProtoFast binary serialization and RPC system that people pick as a simpler, zero-copy alternative to Protobuf. Caveat: output can be large and the C++ code is less ergonomic.20recommend
- ProtobufSchema-based binary format with good tooling and forward and backward compatibility across many languages. Critics most often flag its silent default values.19recommend
- FlatBuffersFast binary serialization format that reads data without parsing, often recommended over Protocol Buffers; critics say its output can be large and bloated.16recommend
- Lite³Fast zero-copy access to indexed, JSON-like data that can be edited in place, though critics say its wire format is not JSON-compatible.14recommend
- RX random-access JSON formatDevelopers recommend it as a compact, random-access format for embedded data, with fast key lookups. Critics say it is not a drop-in JSON.parse replacement and the docs need work.11recommend
- AvroRecommended as a compact, schema-based alternative to XML and JSON for RPC and stored data. Critics note data needs a copy step before use and enforcement needs extra tooling.10recommend
- Apache ForyFree open-source serialization framework recommended for object graphs and high throughput. Critics note it relies on internal JDK APIs and question its benchmark data.6recommend