Open machinekoder opened 8 years ago
For backwards compatibility between different version of the protobuf messages Enums should have an UNKNOWN field with value 0. See http://stackoverflow.com/questions/10392952/how-to-design-for-a-future-additional-enum-value-in-protocol-buffers Most importantly the id 0 should not be used by anything else except the UNKNOWN value.
Enums
UNKNOWN
0
yeah good point wrt proto3
For backwards compatibility between different version of the protobuf messages
Enums
should have anUNKNOWN
field with value0
. See http://stackoverflow.com/questions/10392952/how-to-design-for-a-future-additional-enum-value-in-protocol-buffers Most importantly the id0
should not be used by anything else except theUNKNOWN
value.