Note that we are using proto2 semantics, where all fields are explicitly required or optional.
Its a shame, would proto3 not be a better target?
e
elizarov
09/28/2017, 7:05 PM
@sandwwraith Can comment on that
s
sandwwraith
09/28/2017, 7:49 PM
AFAIK, you can serialize your classes in proto2 semantics, and it can be normally deserialized in proto3.
In deserialization, proto3 provides very unhandy semantics - each field can be represented in stream one or zero times. It means that any field implicitly is optional, which in my opinion is not very idiomatic
You can mark each field of your class as @Optional, and therefore it could be deserialized from proto3 stream
With an exception on packed arrays - they are not supported yet