Skip to content

Commit

Permalink
Remove JsonValueKind.String from switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreuer committed Sep 5, 2024
1 parent b8c57e8 commit 8facbe4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public override IFieldReader Read(ref Utf8JsonReader reader, Type typeToConvert,
JsonDocument doc = JsonDocument.ParseValue(ref reader);
return doc.RootElement.ValueKind switch
{
JsonValueKind.Object or JsonValueKind.Array or JsonValueKind.String => new JsonSerializedField(doc),
JsonValueKind.Object or JsonValueKind.Array => new JsonSerializedField(doc),
_ => throw new JsonException($"Expected an array or object when deserializing a {typeof(IFieldReader)}. Found {reader.TokenType}"),
};
}
Expand Down

0 comments on commit 8facbe4

Please sign in to comment.