Does YamlDotNet
library support Deserialization
into existing object rather than creation a new one?
I need it because my object is created through Dependency Injection
, so I prefer a way when Deserialization
fill (rewrite) all properties into the given object.
I didn't find suitable overloading of the Deserialization
method.
Of course, I know I can manually handle YamlMappingNode
but simplicity of the Deserialization
method is so cute, writing a Copy Constructor for each type isn't an option too. Introducing an intermediate dictionary with properties value is ugly.
Also, I think it can be highly demanded feature.