Skip to main content
Definition Website Computer and Technology

Data Serialization

Subject: Computer and Technology noun /ˈdeɪ.tə ˌsɪr.i.ə.ləˈzeɪ.ʃən/ 1 definition

  1. Definition (noun)

    Entry #125 · Updated

    Data Serialization is the process of translating structured in-memory data—such as objects, arrays, maps, and primitive values—into a sequential, self-contained format of bytes or characters for persistent storage or network transmission. Because live program data depends on runtime-specific memory layouts, pointers, and processor byte order, serialization flattens those structures into a standardized representation that a receiving system can later reconstruct through deserialization. By decoupling data representation from runtime memory models, it enables cross-language interoperability and durable state exchange across distributed systems while remaining distinct from transport protocols and application-level validation.

    Common Forms

    • Text-Based Serialization: Encodes data as human-readable characters using formats such as JSON, XML, or YAML, prioritizing broad interoperability and ease of inspection over compact size and parsing speed.

    • Schema-Driven Binary Serialization: Compiles predefined data contracts—such as Protocol Buffers, Apache Avro, or FlatBuffers—into compact binary payloads using numeric field tags or positional offsets for high throughput and controlled schema evolution.

    • Schemaless Binary Serialization: Packs self-describing typed values into compact byte streams—as in MessagePack, CBOR, or BSON—reducing size and parsing overhead compared with text formats without requiring a separate schema definition.

    • Language-Native Object Serialization: Captures runtime-specific object graphs, class metadata, and internal references within a single ecosystem (such as Python pickle or Java Serializable), trading cross-language portability and untrusted-input safety for seamless language fidelity.

    Example

    Before saving a customer's shopping cart from a Node.js web service into a Redis cache, the application serializes the in-memory object containing item IDs, quantities, and unit prices into a UTF-8 JSON string. When a separate checkout worker later reads that cache key, it deserializes the JSON payload back into a native object to compute order totals and reserve inventory.