Skip to content

Commit 26fded2

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Updated file based on review feedback
1 parent 8a642ec commit 26fded2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/Custom/JsonExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public static string RemoveDefaultNullProperties(this JToken token)
3636
{
3737
RemoveDefaultNullProperties(property.Value);
3838
}
39-
else if (property.Value.Type == JTokenType.String && property.Value.ToString() == "defaultnull")
39+
else if (property.Value.Type == JTokenType.String && property.Value.ToString().Equals("defaultnull",StringComparison.Ordinal))
4040
{
4141
property.Remove();
4242
}
43-
else if (property.Value.Type == JTokenType.String && property.Value.ToString() == "null")
43+
else if (property.Value.Type == JTokenType.String && property.Value.ToString().Equals("null",StringComparison.Ordinal))
4444
{
4545
property.Value = JValue.CreateNull();
4646
}
@@ -57,11 +57,11 @@ public static string RemoveDefaultNullProperties(this JToken token)
5757
{
5858
RemoveDefaultNullProperties(item);
5959
}
60-
else if (item.Type == JTokenType.String && item.ToString() == "defaultnull")
60+
else if (item.Type == JTokenType.String && item.ToString().Equals("defaultnull",StringComparison.Ordinal))
6161
{
6262
jsonArray.RemoveAt(i); // Remove the "defaultnull" string from the array
6363
}
64-
else if (item.Type == JTokenType.String && item.ToString() == "null")
64+
else if (item.Type == JTokenType.String && item.ToString().Equals("null",StringComparison.Ordinal)
6565
{
6666
jsonArray[i] = JValue.CreateNull(); // Convert "null" string to actual null
6767
}

0 commit comments

Comments
 (0)