From 650e0a25eef423a0c6d38eaf3075df9c1489c87f Mon Sep 17 00:00:00 2001 From: Joseph Ivie Date: Mon, 28 Oct 2024 17:52:03 -0600 Subject: [PATCH] CSV parse fix for blank strings --- .../lightningserver/serialization/StringDeferringDecoder.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server-core/src/main/kotlin/com/lightningkite/lightningserver/serialization/StringDeferringDecoder.kt b/server-core/src/main/kotlin/com/lightningkite/lightningserver/serialization/StringDeferringDecoder.kt index 10ab928b..43cd9864 100644 --- a/server-core/src/main/kotlin/com/lightningkite/lightningserver/serialization/StringDeferringDecoder.kt +++ b/server-core/src/main/kotlin/com/lightningkite/lightningserver/serialization/StringDeferringDecoder.kt @@ -64,14 +64,15 @@ class StringDeferringDecoder( if ( (descriptor.kind == StructureKind.CLASS && ( - desc.kind == PrimitiveKind.STRING || - !descriptor.isElementOptional(index) && desc.isNullable + !descriptor.isElementOptional(index) && (desc.kind == PrimitiveKind.STRING || desc.isNullable) )) || map.keys.any { it.startsWith(name) && (it.length == name.length || it[name.length] == '.') } ) { return index + } else { + println("NO") } if (isCollection) { // if map does not contain key we look for, then indices in collection have ended