Re: [protobuf] ParseFromArray always returning true

2017-12-07 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Dec 6, 2017 at 4:39 PM, 'Allen Vicencio' via Protocol Buffers < protobuf@googlegroups.com> wrote: > If all my fields in a protobuf are `optional`, will ParseFromArray ever > return false? I am doing some tests right now, and I am testing two > scenarios: > > >> Person > > optional string n

[protobuf] ParseFromArray always returning true

2017-12-06 Thread 'Allen Vicencio' via Protocol Buffers
If all my fields in a protobuf are `optional`, will ParseFromArray ever return false? I am doing some tests right now, and I am testing two scenarios: > Person optional string name; Vehicle optional int64 wheels; 1. Empty buffer is passed into Person#ParseFromArray. Returns true. 2.