YamlDotNet icon indicating copy to clipboard operation
YamlDotNet copied to clipboard

Fix use of `DynamicTypeResolver` during deserialization.

Open willson556 opened this issue 6 years ago • 2 comments

Previously the type resolver would only be able to return the static type because the object constructed by the factory was not passed into the type descriptor.

See the added tests for a couple of use cases.

willson556 avatar Apr 28 '20 01:04 willson556

I'm not sure that this change is correct. What are you trying to achieve ? I don't think that the type inspectors should use the type resolver at that point.

aaubry avatar May 01 '20 11:05 aaubry

I'm not sure that this change is correct. What are you trying to achieve ? I don't think that the type inspectors should use the type resolver at that point.

We're trying to achieve a couple of things (both demonstrated in the added tests):

  • Deserialize properties that aren't present in the expected/static type but are in the instantiated type.
  • Deserialize properties which are get-only in the expected/static type but have setters in the instantiated type.

willson556 avatar May 01 '20 19:05 willson556

This PR appears to be abandoned, it's over a year old. I'm going to close it.

EdwardCooke avatar Jan 13 '23 20:01 EdwardCooke

That's fine; I'm no longer working on the project utilizing YamlDotNet. The project moved forward with a fork that had these changes.

willson556 avatar Jan 13 '23 20:01 willson556