MassTransit currently (as of v7) does not use System.Text.Json, it uses Newtonsoft.Json. There are no plans underway to add support for it at this time.
If you were using JSON.net, you can add additional converters by configuring the JSON serializer.
cfg.ConfigureJsonSerializer(settings => settings.Converters.Add(...))
It's important to leave the existing converters or you may break existing functionality.
As of v8, System.Text.Json is the default Json serializer.
Configuring the serializer remains the same:
x.UsingRabbitMq((ctx, cfg) =>
{
// ...
cfg.ConfigureJsonSerializerOptions(opts =>
{
opts.Converters.Add(YOUR_CUSTOM_CONVERTER);
return opts;
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With