STJ Polymorphic Serialization in Source Gen mode
I trying to remain AOT compatible for my library. I have a class that users can inherit from, so I'm unable to add the derived type attributes to the base type directly. I'm able to have the user register their custom types all in one place using a static method, and internally use a Modifier to add them to the list of derived types for that
Here's a gist: https://gist.github.com/markdibarry/354e2b9ed387e9b2f94088d2ad00c496
JsonTypeInfo. This works for reflection-based DefaultJsonTypeInfoResolver, but no matter what I do, the delegate passed into WithAddedModifier() is never called if I use the source gen context and it just errors. Is there a way to add these in source gen mode?Here's a gist: https://gist.github.com/markdibarry/354e2b9ed387e9b2f94088d2ad00c496
Gist
Polymorphic serialization with Source Gen. GitHub Gist: instantly share code, notes, and snippets.
