From 8facbe440c4e4608c271cdb9dabbdcf711cb3d53 Mon Sep 17 00:00:00 2001 From: Jeroen Breuer Date: Thu, 5 Sep 2024 15:39:17 +0200 Subject: [PATCH] Remove JsonValueKind.String from switch. --- .../Serialization/Converter/FieldConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sitecore.AspNetCore.SDK.LayoutService.Client/Serialization/Converter/FieldConverter.cs b/src/Sitecore.AspNetCore.SDK.LayoutService.Client/Serialization/Converter/FieldConverter.cs index fa3d5e4..5fa6a3f 100644 --- a/src/Sitecore.AspNetCore.SDK.LayoutService.Client/Serialization/Converter/FieldConverter.cs +++ b/src/Sitecore.AspNetCore.SDK.LayoutService.Client/Serialization/Converter/FieldConverter.cs @@ -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}"), }; }