syntax="proto3";
import "google/protobuf/descriptor.proto"
extend google.protobuf.FieldOptions{
bool presence=50001;
}
message Mymessage
{
int32 foo=1[(presence)=true];
string bar=2;
}
I wrote following code and encoded:
Mymessage l_message;
l_message.set_foo(1);
l_message.set_bar("hello");
When I encoded it using l_message.SerializeToString(), the encoded payload
doesn't have field options. Am I missing something? Please help.
What will be payload with custom field options encoded?
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/c08aadbb-142b-4554-a82d-9615b1423612%40googlegroups.com.