I'm using Protobuf for python.
I've been trying to use default values but everytime I run SerializeToString() i get nothing.
For example,
here is my .proto file object
message Test{
optional string lol = 1 [default="HI"];
optional int32 num = 2 [default=200];
}
I run
test = packets_pb2.Test()
print(test.num)
print(test.SerializeToString())
and get 200 for print(test.num) but no results (empty) for SerializeToString()
I want my default values to be serialized.
Any idea how to get this done?
Thanks in advance.
proto2
? – Diagenesis