Protobuf Web API in C#
Using Google Protocol Buffers (protobuf) for serialization over a Web API (or REST API) is simple. Most developers use JSON as the go-to transfer protocol for services even though it is needlessly verbose, slow to serialize, and lacks the kind of functionality that Google added to protobuf. This article briefly talks about the advantages of services with protobuf, when to use them, and how to create and consume them with ASP.NET Core and RestClient.Net. Advantages Protocol buffers are Google’s language-neutral, platform-neutral, extensible mechanism for serializing structured data. If you’re reading this, I hope I don’t have to convince you about the performance and bandwidth saving benefits of binary serialization over JSON. There is a myriad of articles that compare the performance of JSON and protobuf. Here is one for good measure. I think I would be flogging a dead horse if I talked...