actual: The following code fails w/ MsgPack.Cli-0.4.4:
public class Data
{
public int X { get; set; }
public int X2 { get { return this.X * 2; } }
}
static void Test()
{
var serializer = MessagePackSerializer.Create<Data>();
// ^ SerializationException: Cannot set value to 'Foo.X2' property
var dat = serializer.PackSingleObject(new Data() { X = 123, });
serializer.UnpackSingleObject(dat);
}
expect: except properties without public setter (X2 in the above code) from the serialization target.
According to the document, the Data class should be serialized that has only one member for the property X.
all read/write PUBLIC members (that is, fields which are not initonly and properties which have both of getter and etter) are serialized.