I should add; re Nullable - if the intent is to support a value
with a non-null default, and to know whether it has a *specified*
value (rather than the default value), there is a pattern for this
(compatible also with XmlSerializer etc); if you use protogen, it will
emit the correct C#. I can dig
Hi Brian. There is a pretty fundamental reason for this: the binary
wire format doesn't have a meaningful way of expressing null. Under
the default Nullable usage, it treats the null value as "do not
serialize" (although there are other ways of expressing this too). I
will get this written up on a
I should have specified that this is in protobuf-net .Net
implementation.
Also, from looking more at the code, it appears that any reference
types ignore the IsRequired parameter. Therefore any class or array
that is null will not be serialized and any array or list that is
empty will not be ser
I'm guessing this question is about protobuf-net, specifically? (Not sure
since I haven't used it myself.)
On Thu, Mar 12, 2009 at 5:23 AM, Bryan wrote:
>
> I noticed in my test app, and then in the ProtoBuf source, that the
> serialization of Nullable properties ignores the IsRequired
> parame