tjsmith
tjsmith

Reputation: 749

Null object in an array or list in protobuf-net v3

In protobuf-net v2.46, I could serialize and deserialize null list entries by adding the following code.

RuntimeTypeModel.Default[typeof(SerializableInnerList<MySerializableInnerObject>)][1].SupportNull = true;

But in the lastest version of Protobuf-net (currently v3.0.29), I see the error: 'ValueMember.SupportNull.set' is obsolete: 'Nullable list elements are not currently implemented'

Does this mean if I want nullable list items I have to stay with the older version of protobuf-net or is there a new way of achieving this in v3 of protobuf-net?

Upvotes: 1

Views: 250

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1064114

Right now: this simply isn't implemented. But unlike "dynamic typing" (which I actively want to kill), this one is probably one I can take another look at - more about timing and needing to ship than it being unsupportable. Let me add it to my list.

Upvotes: 3

Related Questions