Browse Source
Merge pull request #9642 from abpframework/auto-merge/rel-4-4/492
Merge branch dev with rel-4.4
pull/9656/head
maliming
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.Text.Encodings.Web; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using Volo.Abp.Json.SystemTextJson.JsonConverters; |
|
|
|
@ -24,6 +25,9 @@ namespace Volo.Abp.Json.SystemTextJson |
|
|
|
|
|
|
|
options.JsonSerializerOptions.Converters.Add(new ObjectToInferredTypesConverter()); |
|
|
|
options.JsonSerializerOptions.Converters.Add(new AbpHasExtraPropertiesJsonConverterFactory()); |
|
|
|
|
|
|
|
// If the user hasn't explicitly configured the encoder, use the less strict encoder that does not encode all non-ASCII characters.
|
|
|
|
options.JsonSerializerOptions.Encoder ??= JavaScriptEncoder.UnsafeRelaxedJsonEscaping; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|