Thanks for the quick reply -- I noticed this in the documentation
after searching for default instance:
"For embedded messages, the default value is always the "default
instance" or "prototype" of the message, which has none of its fields
set." So, does this mean that even the required fields will be set to
their default values in this prototype object? Or is there some other
algorithm for the values of the fields within the prototype/default
instance?
For broader context, I'm trying to figure out how to determine if an
optional field was actually set in the transmitted protocol buffer or
whether its default value was filled in automatically.
In reference to the example below, if the title field had been set to
"Field of Dreams" and then the user set it to an empty string "", I
would want to actually update the value in my data store to be the
empty string. However, if the user didn't change the title field at
all, I will still see an empty string in the title field when I try
and get at the field through the accessor. I'm looking for a way to
setup my protocol buffer format so I can distinguish between those two
cases.
Thanks again.
> >
protobuf+u...@googlegroups.com<protobuf%2Bunsubscribe@googlegroups.c om>
> > .