Replies: 1 comment 3 replies
-
|
Look into unions and typeless in the readme. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I am experimenting with MessagePack Typeless serialization. I have noticed that if I have a field of type base_type and I assign it an object of type derived_type derived from base_type, the object appears to come back as a base_type type object after deserialization. Is there a way to have the serializer retain the runtime type of the object if it is different from the field type in cases like this? This is also true of elements in a typed collection.
`
`
In the above code, the "clone" object has only fields and list elements of type ItemType, whereas the original object has objects of type DerivedItemType. Therefore data from the derived type (TestField in this case) is lost. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions