Before .NET 8 setting global settings in an Azure Function used to work just fine. Now this same code doesn’t work in .NET 8 and Azure Functions v4:
// Setting global System.Text.Json.JsonSerializerOptions
services.Configure<JsonSerializerOptions>(options =>
{
options.PropertyNameCaseInsensitive = true;
options.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault; // Property is ignored if its value is null. This is applied only to reference-type properties and fields.
});
Is this no longer supported? I cannot find any documentation how to do it in .NET 8.