Protobuf backward compatibility and proto3 vs proto2

前端 未结 1 780
天命终不由人
天命终不由人 2021-01-06 03:25

One of selling points of Protobuf was backward compatibility, i.e. developers can evolve format, and older clients can still use it.

Now with new Protobuf version ca

相关标签:
1条回答
  • 2021-01-06 04:02

    Yes, if some of your systems are proto2 based, it is probably best to keep using proto2. In my opinion, proto3 does not introduce many new features and most libraries will continue supporting proto2.

    However, the wire format is mostly compatible. As long as the tag number is the same, the encoding remains the same. The required/optional specifiers do not affect the encoding, they are only checks that are performed after decoding.

    0 讨论(0)
提交回复
热议问题