Why we use Protocol Buffer instead of Json

The definition of Protocol buffer is given below,

“Protocol Buffers are a way of encoding structured data in an efficient yet extensible format”

  1. It allows as us to define the schema in .proto file. So we have to generate the mapping classes using that file. Its easy to know the request the response fields by going through it.
  2. Backward compatibility is very easy as we are numbering each fields in the proto file
  3. Its best suitable for the backend application. Ours is a ReSt application which interacts with an another backend application. Obviously the backend application supports only protobuf format so we dont have any choice other than using Protobuf.
  4. We can specify the required and optional flag for each fields. This allows us to extend the functionality in the future without making any changes to the client application
  5. Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s