if you use JsonMessageSerializer in web api aplication with default settings, an error is thrown
System.InvalidOperationException: Serializer options cannot be changed once serialization or deserialization has occurred.. at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializerOptionsImmutable(JsonSerializerContext context) at System.Text.Json.Serialization.ConverterList.Add(JsonConverter item) at SlimMessageBus.Host.Serialization.SystemTextJson.JsonMessageSerializer..ctor(JsonSerializerOptions options) at SlimMessageBus.Host.Serialization.SystemTextJson.SerializationBuilderExtensions.<>c__DisplayClass0_01.b__1(IServiceProvider svp)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
if you use JsonMessageSerializer in web api aplication with default settings, an error is thrown
System.InvalidOperationException: Serializer options cannot be changed once serialization or deserialization has occurred.. at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializerOptionsImmutable(JsonSerializerContext context) at System.Text.Json.Serialization.ConverterList.Add(JsonConverter item) at SlimMessageBus.Host.Serialization.SystemTextJson.JsonMessageSerializer..ctor(JsonSerializerOptions options) at SlimMessageBus.Host.Serialization.SystemTextJson.SerializationBuilderExtensions.<>c__DisplayClass0_0
1.2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
https://github.com/zarusz/SlimMessageBus/blob/master/src/SlimMessageBus.Host.Serialization.SystemTextJson/JsonMessageSerializer.cs#L24