You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fails to serialize non-attributed classes with read-only properties #28
actual: The following code fails w/ MsgPack.Cli-0.4.4:
publicclassData{publicintX{get;set;}publicintX2{get{returnthis.X*2;}}}staticvoidTest(){varserializer=MessagePackSerializer.Create<Data>();// ^ SerializationException: Cannot set value to 'Foo.X2' propertyvardat=serializer.PackSingleObject(newData(){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.
Activity
yfakariya commentedon Sep 6, 2014
Close because fixed in #30.