Protobuf backward compatibility and proto3 vs proto2

给你一囗甜甜゛ 提交于 2019-12-06 07:49:56

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!