Re: [protobuf] Re: validating protobuf messages

2017-12-10 Thread Marc Gravell
a zero tag is never valid in any protobuf data, although it wouldn't be unheard of for folks to use a zero tag as a sentinel value to demark multiple root messages. Protoc has some facilities to check the insides of a message that might help you figure out how likely it is to be a match, but it won

[protobuf] Re: validating protobuf messages

2017-12-10 Thread Annu Bansal
Hey Jeroen! Dis you get any method to check if a .pb file is generated from givem .proto file? Actually, I'm getting error while deserializing a .pb file, "The protocol message contained invalid tag(zero)." I was wondering if the two files are compatible. Thanks in advance. On Saturday, Novem

[protobuf] Re: validating protobuf messages

2012-11-19 Thread alex
What's the definition of "Validate"? pb support optional fields, extensions , that means you can ignore unknown fields. If some fields are necessary why not just set to required. On Saturday, November 17, 2012 8:08:16 AM UTC+8, Jeroen Ooms wrote: > > I am using the RProtoBuf package, which inte

[protobuf] Re: validating protobuf messages

2012-11-17 Thread BJ Neilsen
Hi Jeroen, It's been my experience that creating your own generator classes that hook directly into libprotoc has solved this exact issue. I've implemented a ruby generator for the protobuf ruby gem[1]. By hooking in and registering your generator you let protoc do all the work of parsing the .