liveBook · Manning

Deserialization

As explained in Troubleshooting Java, Second Edition

Deserialization is the process of reconstructing structured data from a serialized byte representation.

Deserialization reconstructs structured data from serialized bytes. It lets a receiving service read objects sent over a network or stored for later use, but mismatched models can produce dropped fields, default values, or errors. section 12.2

Use deserialization when investigating evolving service data contracts:

  • Compare the producer’s payload or schema with the receiver’s model. section 12.2
  • Check whether added fields, renamed enum values, optionality changes, or Java version identifiers alter reconstruction. section 12.2
  • Distinguish silent data loss and default values from explicit deserialization errors. section 12.2
message Order {
  int64 id = 1;
  string customer_id = 2;
  repeated string items = 3;
  optional string notes = 4;
}

A small Protobuf schema shows the fields and optionality that generated classes use during serialization and deserialization. section 12.2

How Troubleshooting Java, Second Edition covers it

How deep it goes
Explains reconstruction, mismatch symptoms, and compatibility concerns without detailing deserializer internals.
Examples
Uses added JSON fields, renamed Protobuf enums, Java version identifiers, and an Order message schema.
What you can do after
Diagnose dropped data, default values, and errors by comparing evolving schemas and receiver models.
How it connects
Connects deserialization with serialization, versioning, Protobuf, gRPC, JSON, XML, and data contracts.

Also explained in

Compare how 10 books explain deserialization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.