序列化配置增加nan的情况
This commit is contained in:
@@ -37,7 +37,8 @@ public static class SystemTextJsonExtension
|
||||
{
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
|
||||
WriteIndented = true, // 缩进
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull // 忽略 null
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, // 忽略 null
|
||||
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals,
|
||||
};
|
||||
// 如有自定义Converter,这里添加
|
||||
// IndentedOptions.Converters.Add(new ByteArrayJsonConverter());
|
||||
@@ -50,7 +51,8 @@ public static class SystemTextJsonExtension
|
||||
{
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
|
||||
WriteIndented = false, // 不缩进
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
|
||||
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals,
|
||||
};
|
||||
NoneIndentedOptions.Converters.Add(new ByteArrayToNumberArrayConverterSystemTextJson());
|
||||
NoneIndentedOptions.Converters.Add(new JTokenSystemTextJsonConverter());
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.6.21</PluginVersion>
|
||||
<ProPluginVersion>10.6.21</ProPluginVersion>
|
||||
<PluginVersion>10.6.22</PluginVersion>
|
||||
<ProPluginVersion>10.6.22</ProPluginVersion>
|
||||
<AuthenticationVersion>2.1.7</AuthenticationVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>10.6.21</Version>
|
||||
<Version>10.6.22</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user