mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
style(tenpayv2): clean code
This commit is contained in:
parent
d839ee8f94
commit
e69b86a60e
@ -30,7 +30,7 @@ namespace Newtonsoft.Json.Converters
|
||||
else if (reader.TokenType == JsonToken.String)
|
||||
{
|
||||
string? value = serializer.Deserialize<string>(reader);
|
||||
if (value == null)
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return existingValue;
|
||||
|
||||
if (CHAR_YES.Equals(value))
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Newtonsoft.Json.Converters
|
||||
@ -26,7 +26,7 @@ namespace Newtonsoft.Json.Converters
|
||||
else if (reader.TokenType == JsonToken.String)
|
||||
{
|
||||
string? value = serializer.Deserialize<string>(reader);
|
||||
if (value == null)
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return existingValue;
|
||||
|
||||
if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset result))
|
||||
|
@ -24,7 +24,7 @@ namespace System.Text.Json.Converters
|
||||
else if (reader.TokenType == JsonTokenType.String)
|
||||
{
|
||||
string? value = reader.GetString();
|
||||
if (value == null)
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return null;
|
||||
|
||||
if (CHAR_YES.Equals(value))
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace System.Text.Json.Converters
|
||||
@ -16,7 +16,7 @@ namespace System.Text.Json.Converters
|
||||
else if (reader.TokenType == JsonTokenType.String)
|
||||
{
|
||||
string? value = reader.GetString();
|
||||
if (value == null)
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return null;
|
||||
|
||||
if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset result))
|
||||
|
Loading…
Reference in New Issue
Block a user