Skip to content

Commit

Permalink
Simplified method as WriteFieldValue handles nulls.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-driscoll committed Nov 10, 2023
1 parent 3fbcbb7 commit 13aaf5e
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,7 @@ private static void WriteDictionary(
foreach (var item in dict)
{
writer.WritePropertyName(item.Key);
if (item.Value is null)
{
writer.WriteNullValue();
}
else
{
WriteFieldValue(writer, item.Value);
}
WriteFieldValue(writer, item.Value);
}

writer.WriteEndObject();
Expand Down

0 comments on commit 13aaf5e

Please sign in to comment.