Replies: 1 comment
-
just found out that this is very similar to #847 |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hello,
is it possible to serialize and deserialize Objects with type annotation?
I know that deserialization is possible, but in a rather rough way. However, I would like to serialize for example a list of different objects with keeping their class.
Heres a sample:
if executed, it would produce this output:
however I like to produce this output:
this type annotation would have the advantage that I should be able load the attributes again. How can I accomplish this?
As far as i can tell this only works for deserialization as written here: https://github.com/aaubry/YamlDotNet/wiki/Deserialization---Type-Discriminators
Beta Was this translation helpful? Give feedback.
All reactions