From 9064d20860afa76ecc175bc3011dee8aad8424d1 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Jan 2025 14:08:33 +0000 Subject: [PATCH] maybe? --- .../Json/Converters/ArrayToObjectFactoryConverter.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Core/Utils/Json/Converters/ArrayToObjectFactoryConverter.cs b/Core/Utils/Json/Converters/ArrayToObjectFactoryConverter.cs index 4ef07ccb..ddaaea86 100644 --- a/Core/Utils/Json/Converters/ArrayToObjectFactoryConverter.cs +++ b/Core/Utils/Json/Converters/ArrayToObjectFactoryConverter.cs @@ -39,8 +39,11 @@ public class ArrayToObjectFactoryConverter : JsonConverterFactory public override void Write(Utf8JsonWriter writer, T? value, JsonSerializerOptions options) { if (value == null) - value = default; - JsonSerializer.Serialize(writer, value, options); + JsonSerializer.Serialize(writer, null, options); + else + { + JsonSerializer.Serialize(writer, value, options); + } } } -} \ No newline at end of file +}