As .net continuously moves in the direction of AoT compilation, it would be great to support non-reflection based serialization & deserialization through source generators.
I had a quick stroll through the codebase, and it should be possible to implement I'd say. The only tricky parts are
- The
Dictionary<string, object> as object can be anything and the Serializer needs to have the exact type in its source generator registered. I haven't looked that deep into it, but maybe the object types are mostly string or at least generally known?
- The generic
T response deserialization where the user can provide any T (e.g. ReadSecretAsync<T>), but this then has to be configured by the users themselves - maybe by registering their own custom TypeInfoResolver?
Would be great if you could consider this. Thanks!
As .net continuously moves in the direction of AoT compilation, it would be great to support non-reflection based serialization & deserialization through source generators.
I had a quick stroll through the codebase, and it should be possible to implement I'd say. The only tricky parts are
Dictionary<string, object>as object can be anything and the Serializer needs to have the exact type in its source generator registered. I haven't looked that deep into it, but maybe theobjecttypes are mostlystringor at least generally known?Tresponse deserialization where the user can provide anyT(e.g.ReadSecretAsync<T>), but this then has to be configured by the users themselves - maybe by registering their own customTypeInfoResolver?Would be great if you could consider this. Thanks!