Conceptually understanding JSON and Protocol Buffers

56 views
Skip to first unread message

theTerribleSWE

unread,
Aug 17, 2021, 9:59:54 PM8/17/21
to Protocol Buffers

Questions:

  1. Seems to me that Protocol Buffers are only meant as an alternative to XML and not JSON. Am I correct?
  2. If yes, how do Protocol Buffers complement JSON or vice-versa?

Background:

I’m trying to learn Protocol Buffers. I see articles online one after another from other developers showing how Protocol Buffers are better than JSON (as well as XML) in certain situations (for example, in communication between backend services not involving the browser).

However, when you look at the “official documentation”, developers at Google only compare Protocol Buffers to XML, not JSON. In fact, in certain areas of Protocol Buffers, they provide additional support for JSON (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#any)

I’m confused. Am I looking at this all wrong?

Effort: I tried searching for an answer to this online but I couldn’t find any

theTerribleSWE

unread,
Aug 17, 2021, 10:14:16 PM8/17/21
to Protocol Buffers
If I am wrong and Google Developers do say that Protocol Buffers are also an alternative to JSON, can you please provide the link to this URL?
Reply all
Reply to author
Forward
0 new messages