YamlDotNet icon indicating copy to clipboard operation
YamlDotNet copied to clipboard

Type Discrimination similar to JSON.Net

Open gwicksted opened this issue 9 years ago • 0 comments
trafficstars

It would be nice to not have to adjust the serialized yaml (by adding tags) to have the deserializer capable of distinguishing types based on what key names or value types were provided.

Or can this be done by INodeTypeResolver? I have not found a good example that doesn't use tags.

Example of how JSON.Net handles this type of problem:

http://stackoverflow.com/questions/11099466/using-a-custom-type-discriminator-to-tell-json-net-which-type-of-a-class-hierarc

gwicksted avatar Sep 21 '16 00:09 gwicksted