📝Protobuf: proto2 vs proto3

Differences between protobuf v2 and v3.

  • proto3 does not support required/optional fields. All fields in proto3 are optional.
  • proto3 does not support specifying default values for optional fields. In proto3, the default value is fixed for type (it is usually 0, false, empty string, etc.)
  • proto2 supports groups (but they are deprecated anyway)
  • proto2 supports extensions mechanism
    • extensions are not supported for oneof

Backlinks