Skip to content

Commit

Permalink
fallthrough is null
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieSinn committed Oct 25, 2023
1 parent ae163c9 commit fbac48f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public override void Write(Utf8JsonWriter writer, Value value, JsonSerializerOpt

writer.WriteEndArray();
}

if (value.IsString)
else if (value.IsString)
writer.WriteStringValue(value.AsString);
else if (value.IsBoolean)
writer.WriteBooleanValue(value.AsBoolean != null && (bool)value.AsBoolean);
Expand All @@ -56,7 +55,7 @@ public override void Write(Utf8JsonWriter writer, Value value, JsonSerializerOpt
}
else if (value.IsDateTime)
writer.WriteStringValue(value.AsDateTime.ToString());
else if (value.IsNull)
else
writer.WriteNullValue();
}
}

0 comments on commit fbac48f

Please sign in to comment.