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

Support YamlConverterAttribute in attribute overrides #1003

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

ChristopherMann
Copy link
Contributor

This PR adds support for the YamlConverterAttribute in the attribute overrides. The allows the configuration of the deserializer as follows:

new DeserializerBuilder()
    .WithAttributeOverride<OuterClassWithoutAttribute>(
        c => c.Value,
        new YamlConverterAttribute(typeof(AttributedTypeConverter)))
    .WithTypeConverter(new AttributedTypeConverter())
    .Build();

This way, the YamlConverterAttribute is more aligned with e.g. the YamlMemberAttribute and it is possible to specify a custom converter for a specific property without modifying the model classes.

@EdwardCooke EdwardCooke merged commit 1055eb7 into aaubry:master Nov 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants