Browse Source

Merge pull request #23321 from abpframework/json.md

Clarify ASP.NET Core JSON options configuration
pull/23322/head
Engincan VESKE 7 months ago
committed by GitHub
parent
commit
011832dbb7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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