How to serialize subtypes with MsgPack in C#
i have a question regarding msgpack serialization in c#. I have a base class and a class derived from base, each of them holding properties, for example: class Base { int PropertyA { get; set; } } class DerivedFromBase : Base { int PropertyB { get; set; } } Additionally i have an object of a third class Container, for example: class Container { Base ContainerProperty { get; set; } } My problem is, if ContainerProperty is of type DerivedFromBase, MsgPack serializes only PropertyA, not PropertyB! How can i achieve, that MsgPack internally recognize ContainerProperty to be a DerivedFromBase? Do i
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.