TL;DR
When serializing/deserializing a class with an interface property like public record User(string Name, IUserEmail Email); in C#, you can achieve this using the JsonDerivedType attribute. (.NET 7 and above)
Background: Wanting to Program with Ty...