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 and deserialization.