[backend/asp] Increase JsonSerializer MaxDepth to 256
200 is the maximum required by the note descendants/ascendants tree, so 256 is that + some margins. Cycle detection is unaffected by this change.
This commit is contained in:
parent
9d1a21e2d9
commit
c1e348b0d5
1 changed files with 1 additions and 0 deletions
|
@ -171,6 +171,7 @@ public static class ServiceExtensions
|
|||
services.Configure<Microsoft.AspNetCore.Mvc.JsonOptions>(options =>
|
||||
{
|
||||
options.JsonSerializerOptions.PropertyNamingPolicy = JsonSerialization.Options.PropertyNamingPolicy;
|
||||
options.JsonSerializerOptions.MaxDepth = 256;
|
||||
foreach (var converter in JsonSerialization.Options.Converters)
|
||||
options.JsonSerializerOptions.Converters.Add(converter);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue