msgpack / msgpack-cli

MessagePack implementation for Common Language Infrastructure / msgpack.org[C#]
http://msgpack.org
Apache License 2.0
834 stars 175 forks source link

Not backwards compatible when adding new property using DataMember attribute #243

Open crosscourt opened 7 years ago

crosscourt commented 7 years ago

[DataMember(IsRequired = false)] public string NewField { get; set; }

It seems adding a new field is not supported. Got an exception "Input string was not in a correct format"

yfakariya commented 7 years ago

IsRequired of [DataMember] is not supported for backward compatibility methods now, you can get compatibility when you set SerializationMethod to Map instead of Array on SerializationContext.