Are you using the FieldMask as a way of performing an update? If so, I believe you would want to use FieldMaskUtil::MergeMessageTo() to update the fields indicated in the mask. That way, you don't have to manually check which paths are present.
On Wed, Oct 25, 2017 at 6:15 PM, Antonia Elsen <[email protected]> wrote: > I'm a bit confused on the correct usage of FieldMasks. > > Based on the documentation, I'm looking at: > - including a FieldMask as a field in my custom message. > - On the client side, modifying the mask by using FieldMaskUtil:: > AddPathToFieldMask(...) > - On the server side, checking if the message's FieldMask has any paths, > and if so, determining which by using FieldMaskUtil:: > IsPathInFieldMask(...) > > Is this the recommended way of using masks? > Are there any cpp examples of FieldMasks being used? > > Thanks! > > -- > 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 post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
