I think it's been elegant for a number of years now. Pretty much ever since Linq became usable.
Serialization libraries need to be decoupled from the records being serialized. These two things are compiled into different assemblies, and often written by different people.
Still possible to replace with compile time codegen, but the implementation gonna be complicated and fragile.
If a library doesn't have an API for using them with generics, you can paper over that with:
T fn<T>(T throwAway) => Library.Deserialize<T>();Sometimes people lump these in with dynamic objects but those are a very different class of thing indeed.
Now, what would be -really- nice is if we had a way to specify that an anonymous type implements an interface. That could potentially simplify a -lot- of DTO modeling.