Skip to content

Commit 6392b72

Browse files
committed
any
1 parent 643bf5a commit 6392b72

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/System.Linq.Dynamic.Core.NewtonsoftJson/Utils/NormalizeUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal static class NormalizeUtils
1212
/// </summary>
1313
internal static JArray NormalizeArray(JArray jsonArray, NormalizationNonExistingPropertyBehavior normalizationBehavior)
1414
{
15-
if (jsonArray.Count(item => item is not JObject) > 0)
15+
if (jsonArray.Any(item => item is not JObject))
1616
{
1717
return jsonArray;
1818
}

src/System.Linq.Dynamic.Core.SystemTextJson/Utils/NormalizeUtils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ private static JsonObject CreateEmptyObject(Dictionary<string, JsonValueInfo> sc
147147
{
148148
JsonValueKind.Array => new JsonArray(),
149149
JsonValueKind.False => false,
150-
JsonValueKind.True => false,
151150
JsonValueKind.Number => default(int),
151+
JsonValueKind.String => string.Empty,
152+
JsonValueKind.True => false,
152153
_ => null,
153154
};
154155
}

0 commit comments

Comments
 (0)