From f5cd4962d7661ee486624389d501c9cf6af741a8 Mon Sep 17 00:00:00 2001 From: Dave Dean Date: Wed, 26 Apr 2023 13:16:58 +0100 Subject: [PATCH] Ignore null Dynamo attributes --- .../Converters/DynamoDbObjectConverter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Hackney.Core/Hackney.Core.DynamoDb/Converters/DynamoDbObjectConverter.cs b/Hackney.Core/Hackney.Core.DynamoDb/Converters/DynamoDbObjectConverter.cs index f8e6ebe..09e7323 100644 --- a/Hackney.Core/Hackney.Core.DynamoDb/Converters/DynamoDbObjectConverter.cs +++ b/Hackney.Core/Hackney.Core.DynamoDb/Converters/DynamoDbObjectConverter.cs @@ -18,7 +18,8 @@ private static JsonSerializerOptions CreateJsonOptions() var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - WriteIndented = true + WriteIndented = true, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; options.Converters.Add(new JsonStringEnumConverter()); return options;