11
Protocol Buffers, Part 3 — JSON Format

Protocol Buffers, Part 3 — JSON Format

6 years ago
Anonymous $9jpehmcKty

https://codeburst.io/protocol-buffers-part-3-json-format-e1ca0af27774

Protobuf’s binary format options are arguably fast to serialize / deserialize, and the binary representation is fairly compact. However, sometimes we want to trade the speed with a human readable text format, or we interface with a system that for some reason cannot use the Protobuf library.

For these reasons, Protobuf also has the option to serialize / deserialize messages to / from JSON format. This post aims to provide a good overview of how to use the JSON format, as well as to cover areas that are less documented in the Protobuf JSON format.