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

Fix 2153 TypeConverterFactory not used #2229

Merged

Conversation

StefanBertels
Copy link
Contributor

See #2153

Notes: I added a new abstract TypeConverterGeneric class to make it easier to create generic type converters.
This is not necessary to fix the issue, but makes it a easier to write generic type converter factories (as can be seen in test).

Please have a look at System.Text.Json.Serialization.JsonConverter (and JsonConverterFactory) which has this and is a quite useful API. I recommend to rename TypeConverterGeneric<T> to TypeConverter<T> to make it consistent (see again JsonConverter) but this name is already taken without <T> for something different. I will add another commit to solve this but of course this is a (minor) breaking change as current TypeConverter is public (but probably not used by anyone). Please feel free to edit/cherry pick.

Let me know if there is anything I can do getting this merged.

@JoshClose JoshClose merged commit ed08fb9 into JoshClose:master Feb 9, 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