From 24761f2d98ac6af58b3f61f9fbeedb0252372e47 Mon Sep 17 00:00:00 2001 From: Tim Ward Date: Mon, 28 Aug 2023 17:56:04 -0700 Subject: [PATCH] Add explanation for jsonElementNullValueKindCheck --- .../Generators/JsonResultBuilderGenerator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs index e1652fa696a..f03ce26a4b8 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs @@ -225,6 +225,7 @@ private void AddDeserializeMethod( .AddCode(jsonElementNullCheck) .AddEmptyLine(); + // Handle JSON null elements. var jsonElementNullValueKindCheck = IfBuilder .New() .SetCondition($"{_obj}.Value.ValueKind == System.Text.Json.JsonValueKind.Null")