December 2018
Intermediate to advanced
500 pages
12h 19m
English
Protobuf (or Protocol Buffers) is a language-neutral serialization format invented at Google. Each protocol buffer message is a small logical record of information, containing a series of name-value pairs. Unlike XML or JSON, here you first define the schema in a .proto file. The following is a .proto file describing a hotel object:
message Hotel {
required string name = 1;
required string city = 2;
optional int no_rooms = 3;
}
Each message type is a list of numbered fields, and each field has a type and a name. After defining the .proto file, you run the protocol buffer compiler to generate code for the object (in the language of your choice), with get/set functions for the fields, as well as object serialization/deserialization ...
Read now
Unlock full access