-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcmvc/subsvcseQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.
Description
Description
The input formatters section in the page about ASP .NET Core MVC model binding says this:
By default, ASP.NET Core includes JSON based input formatters for handling JSON data.
It doesn't specify exactly what JSON input formatter library it uses. Does it use System.Text.Json.JsonSerializer
or Newtonsoft.Json
? How can I set a custom default JsonSerializerOptions
for MVC model binding?
I think that this doc page should mention that it can be configured with
builder.Services.AddControllers().AddJsonOptions(options =>
{
options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
options.JsonSerializerOptions.PropertyNamingPolicy=JsonNamingPolicy.CamelCase;
});
Page URL
https://learn.microsoft.com/en-us/aspnet/core/mvc/models/model-binding?view=aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/mvc/models/model-binding.md
Document ID
9c4af557-8d06-4c6c-ad2a-0dd234547563
Platform Id
5bedc93c-9e23-37ef-e090-7258b295f643
Article author
Metadata
- ID: e24f48f8-6c4d-ecda-6ce6-a7826d396e99
- PlatformId: 5bedc93c-9e23-37ef-e090-7258b295f643
- Service: aspnet-core
- Sub-service: mvc
Metadata
Metadata
Assignees
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcmvc/subsvcseQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.
Type
Projects
Status
✅ Done