Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeConverters should be able to deserialize complex types #459

Open
ramon-garcia opened this issue Dec 9, 2019 · 2 comments
Open

TypeConverters should be able to deserialize complex types #459

ramon-garcia opened this issue Dec 9, 2019 · 2 comments

Comments

@ramon-garcia
Copy link

The current interface of IYamlTypeConverter one cannot deserialize a type that contains other types. Unlike that interface INodeDeserializer, the interface does not receive a nested object deserializer (Func<IParser, Type, object?> nestedObjectDeserializer).

This makes it difficult to customize deserialization of custom types.
Implementing IYamlConvertible is another option, but forces one to mix class code with yaml deserialization code, and is not possible for types from third party libraries.

@ramon-garcia
Copy link
Author

The general problem with these libraries is the impedance between the object model and the Yaml model. Every step to make them closer will make the library much more useful.

@aaubry
Copy link
Owner

aaubry commented Mar 13, 2020

I agree that the IYamlTypeConverter interface needs to be reworked. It is annoying that doing so would introduce a breaking change, but it would probably not be too disturbing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants