Browse Source
Merge pull request #10047 from abpframework/AllowReadingFromString
JSON Numbers can be read from string.
pull/10049/head
liangshiwei
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
3 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs
-
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs
-
framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs
|
|
@ -33,7 +33,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Json |
|
|
|
|
|
|
|
|
// Remove after this PR.
|
|
|
// Remove after this PR.
|
|
|
// https://github.com/dotnet/runtime/pull/57525
|
|
|
// https://github.com/dotnet/runtime/pull/57525
|
|
|
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.Strict; |
|
|
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
@ -53,7 +53,7 @@ namespace Volo.Abp.EntityFrameworkCore.ValueConverters |
|
|
|
|
|
|
|
|
// Remove after this PR.
|
|
|
// Remove after this PR.
|
|
|
// https://github.com/dotnet/runtime/pull/57525
|
|
|
// https://github.com/dotnet/runtime/pull/57525
|
|
|
deserializeOptions.NumberHandling = JsonNumberHandling.Strict; |
|
|
deserializeOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString; |
|
|
|
|
|
|
|
|
var dictionary = JsonSerializer.Deserialize<ExtraPropertyDictionary>(extraPropertiesAsJson, deserializeOptions) ?? |
|
|
var dictionary = JsonSerializer.Deserialize<ExtraPropertyDictionary>(extraPropertiesAsJson, deserializeOptions) ?? |
|
|
new ExtraPropertyDictionary(); |
|
|
new ExtraPropertyDictionary(); |
|
|
|
|
|
@ -32,7 +32,7 @@ namespace Volo.Abp.Json.SystemTextJson |
|
|
|
|
|
|
|
|
// Remove after this PR.
|
|
|
// Remove after this PR.
|
|
|
// https://github.com/dotnet/runtime/pull/57525
|
|
|
// https://github.com/dotnet/runtime/pull/57525
|
|
|
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.Strict; |
|
|
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|