JSON options configuration
ConfigureRouteHandlerJsonOptions has been renamed ConfigureHttpJsonOptions, see dotnet/aspnetcore#42747
Need to update the following code for next release:
using System.Text.Json.Serialization;
var builder = WebApplication.CreateBuilder(args);
builder.Services.ConfigureRouteHandlerJsonOptions(options =>
{
options.SerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles;
options.SerializerOptions.AllowTrailingCommas = true;
options.SerializerOptions.MaxDepth = 8;
});
var app = builder.Build();
app.MapGet("/", () => "Hello World!");
app.Run();
JSON options configuration
ConfigureRouteHandlerJsonOptionshas been renamedConfigureHttpJsonOptions, see dotnet/aspnetcore#42747Need to update the following code for next release: