adjust serialization settings
This commit is contained in:
parent
3f6bb38788
commit
262de36590
@ -4,7 +4,11 @@ using Sequence.Entities;
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
builder.Services.AddControllersWithViews().AddJsonOptions(options =>
|
||||
{
|
||||
//options.JsonSerializerOptions.MaxDepth = 3;
|
||||
options.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
|
||||
});
|
||||
|
||||
builder.Services.AddDbContext<DbContext>((services, options) =>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user