Re: [protobuf] How to erase particular field with MergeFrom()

2016-05-18 Thread Benjamin Krämer
And instead of encapsulating the field mask into a new message, you should be alright to just use google.protobuf.FieldMask as it is already a message by itself (in case that you don't add other data to RepAndOptMask of course). Am Dienstag, 17. Mai 2016 10:51:04 UTC+2 schrieb Denis Bakhvalov:

Re: [protobuf] How to erase particular field with MergeFrom()

2016-05-17 Thread 'Feng Xiao' via Protocol Buffers
On Tue, May 17, 2016 at 1:49 AM, Denis Bakhvalov wrote: > Hi Feng Xiao, > > Thanks for your reply! > > Unfortunately I couldn't find good examples how to use it, so let me ask > one more question: > > Should I put mask as a part of original message: > > message RepAndOpt > {

Re: [protobuf] How to erase particular field with MergeFrom()

2016-05-17 Thread Denis Bakhvalov
Hi Feng Xiao, Thanks for your reply! Unfortunately I couldn't find good examples how to use it, so let me ask one more question: Should I put mask as a part of original message: message RepAndOpt { repeated string name = 1; string surname = 2; google.protobuf.FieldMask

Re: [protobuf] How to erase particular field with MergeFrom()

2016-05-17 Thread Denis Bakhvalov
Hi Feng Xiao, Thanks for your reply! Unfortunately I couldn't find good examples how to use it, so let me ask one more question: Should I put mask as a part of original message: message RepAndOpt { repeated string name = 1; string surname = 2; google.protobuf.FieldMask

Re: [protobuf] How to erase particular field with MergeFrom()

2016-05-16 Thread 'Feng Xiao' via Protocol Buffers
On Wed, May 11, 2016 at 5:09 AM, Denis Bakhvalov wrote: > Hi, > > Suppose I have such message structure: > > > package msg_RepAndOpt; > > message RepAndOpt{ > repeated string name = 1; > optional string surname = 2; > ... > // there are lots of others.} > > >

[protobuf] How to erase particular field with MergeFrom()

2016-05-16 Thread Denis Bakhvalov
Hi, Suppose I have such message structure: package msg_RepAndOpt; message RepAndOpt{ repeated string name = 1; optional string surname = 2; ... // there are lots of others.} And I have two components that have copies of this message: // component1:RepAndOpt A;