[protobuf] Re: What is the default value for a message used as a field type within another message?

2010-06-04 Thread Jax
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

Re: [protobuf] Re: What is the default value for a message used as a field type within another message?

2010-06-04 Thread Kenton Varda
Use the has accessors to determine whether the field was explicitly set. Java: message.hasFoo() C++: message.has_foo() Python: message.HasField(foo) # (I think; check docs) On Fri, Jun 4, 2010 at 10:18 AM, Jax jax...@gmail.com wrote: Thanks for the quick reply -- I noticed this in the

[protobuf] Re: What is the default value for a message used as a field type within another message?

2010-06-04 Thread Jax
Perfect, just what I was looking for. Thanks much. On Jun 4, 10:27 am, Kenton Varda ken...@google.com wrote: Use the has accessors to determine whether the field was explicitly set. Java:  message.hasFoo() C++:  message.has_foo() Python:  message.HasField(foo)  # (I think; check docs) On