jsonrestprotocol-buffersmicroservices

Protocol Buffer vs Json - when to choose one over the other?


Can anyone explain when to use protocol buffer instead of JSON (and vice versa) for a microservices architecture? Both for synchronous and asynchronous communication.


Solution

  • When to use JSON

    Advantages of ProtoBuf

    While we are at it, have you looked at flatbuffers?

    Some of the aspects are covered here google protocol buffers vs json vs XML

    Reference:

    https://codeclimate.com/blog/choose-protocol-buffers/

    https://codeburst.io/json-vs-protocol-buffers-vs-flatbuffers-a4247f8bda6f