Emit scalar field with default value.

15 views
Skip to first unread message

Rupleena Chhabra

unread,
Sep 5, 2019, 1:25:43 AM9/5/19
to grpc.io
Hi,

Proto3 specification for Protocol buffer states that if a scalar message field is set to its default value, the value will not be serialized on the wire. 

However, in case we have a scalar field set to default value, e.g. an int32 message field with value set as 0, Is there a way to emit it with default value in Java?


Thanks!
Rupleena

Penn (Dapeng) Zhang

unread,
Sep 13, 2019, 5:58:11 PM9/13/19
to grpc.io
I may not understand you question correctly. As long as you use proto3, there is no way to emit the default value as some bytes on the wire.
Reply all
Reply to author
Forward
0 new messages