Browse Source

Clarify ASP.NET Core JSON options configuration

pull/23321/head
maliming 7 months ago
parent
commit
8619bf6c35
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 17
      docs/en/framework/infrastructure/json.md

17
docs/en/framework/infrastructure/json.md

@ -69,6 +69,19 @@ Add [Volo.Abp.Json.Newtonsoft](https://www.nuget.org/packages/Volo.Abp.Json.Newt
## Configuring JSON options in ASP.NET Core
You can change the JSON behavior in ASP.NET Core by configuring [JsonOptions](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.jsonoptions) or
[MvcNewtonsoftJsonOptions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.mvcnewtonsoftjsonoptions)(if you use `Newtonsoft.Json`)
Configuring JSON options in ABP does not affect ASP.NET Core's JSON settings. To modify ASP.NET Core JSON behavior, configure [JsonOptions](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.jsonoptions) or [MvcNewtonsoftJsonOptions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.mvcnewtonsoftjsonoptions) (if you're using `Newtonsoft.Json`) separately.
Example:
```csharp
Configure<JsonOptions>(options =>
{
//options.SerializerOptions
});
// If you use Newtonsoft.Json
Configure<MvcNewtonsoftJsonOptions>(options =>
{
//options.SerializerSettings
});
```

Loading…
Cancel
Save