Closed mtmk closed 7 months ago
Currently because we're AOT compatible context or ad-hoc JSON serialization requires a bit of setup to register in the connection:
var jsonRegistry = new NatsJsonContextSerializerRegistry(MyJsonContext.Default); return opts with { SerializerRegistry = jsonRegistry };
We should be able to simplify this when using hosting extensions.
I took an initial stab at this here as part of #392. Let me know if it aligns with what you were thinking and I can tweak it.
Proposed change
Currently because we're AOT compatible context or ad-hoc JSON serialization requires a bit of setup to register in the connection:
We should be able to simplify this when using hosting extensions.