Azure Table Storage Serialization

I’m storing a complex object in a saga (a response message). This works as expected and it can be retrieved. See also the saga structure below.

class SagaSyncContactWorkflow : ContainSagaData
    public Guid ContactId { get; set; }
    public CustomerOrLead CustomerOrLead { get; set; } = null!;
    public FindContactResponse? FindContactResponse { get; set; }

But when the complex type needs Json.NET type names in the JSON the deserialization fails. I expected the name types to be added, because these are configurated (see below), but after inspecting the sage these where missing. Is this correct? Is the serializer for complex types in saga’s a different serializer (config)? Is there an option to change the config for saga serialization?

            .Settings(new JsonSerializerSettings
                TypeNameHandling = TypeNameHandling.Auto

Hi Remy,

To configure the serializer for the saga storage, you need to use this API here

Hope that helps


Thanks, I missed that documentation.