0

I was reading this article about protobuf and I wondered where to use it in the projects. I read some articles that said google created protobuf to replace XML, but as far as I know in 2008 (the first release) JSON was already there.

I searched more and I found an article that the writer suggested to use it instead of JSON, but I still don't get the idea completely.

So where shall I use it? Any special scenario, or like JSON whenever that I want to transport data? Any other scenarios?

Ashkan S
  • 10,464
  • 6
  • 51
  • 80
  • I'd say any place you want to transmit, persist or otherwise serialize and deserialize data while minimizing its size and keeping it resilient to changes in the format. – Rotem Aug 01 '16 at 07:40

1 Answers1

0

It is useful whenever you want to serialize/deserialize your data. Typical situations include sending your data to someone else over the network, storing it to disk or keeping it in context while performing asynchronous processes.

Here is a brief explanation about the main differences between protocol buffer, json and XML: https://stackoverflow.com/a/14029040/6681872

Community
  • 1
  • 1