JSON vs. Protobuf — Serialization/Deserialization Speeds

Exploring the Serialization Speeds

KRISHNA KISHORE V
5 min readDec 29, 2023
Benchmark Test of JSON and Proto Serialization

In the modern world of coding, Protobufs are getting attention and outperforming JSON in the way they pack and unpack data. Both of these data-exchange technologies have their unique way of dealing with packing & unpacking.

In our previous articles, we implemented the gRPC Server in Java and the gRPC Client in Nodejs. In this article, we’re diving into serialization and deserialization. We’ll write a performance test to understand how these data movers perform in their data adventures.

This would rather be an important article, so have patience in reading this and code along to understand this better. In part 1 (this article), we’ll write some performance tests to see how these guys are performing.

So let’s jump right in.

First, let’s have a basic understanding of serialization and deserialization. If you are an experienced developer and already know these terms please feel free to skip them or if you want a quick refresh on these definitions please continue along.

Serialization:

Serialization also called Packing or Marshalling is the process of converting the domain objects — the POJOs into binary format (byte array) so that they…

--

--

KRISHNA KISHORE V

Full Stack Tech Lead | Software Consultant | Technical Content Writer