3

Describing Data with Protobuf Text Format

Before moving towards learning the internals of Protobuf, there is another skill that we need to learn. This skill is reading and writing txtpb files. They contain data written in the Protobuf text format, which is the text representation of the data that we deserialize from the binary form or the data that we want to serialize into binary form.

In this chapter, we’re going to cover the following main topics:

  • Why use the text format
  • Writing scalar values
  • Writing complex types

At the end of this chapter, you will know what the Protobuf text format is and what it is used for. However, most importantly, you will be able to write data that we will later use to discover the internals of serialization ...

Get Protocol Buffers Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.