From eb86a933c4a9c2b4de234e108053df2b377a7042 Mon Sep 17 00:00:00 2001 From: james Date: Sun, 14 May 2023 19:20:37 +0100 Subject: [PATCH] Fixing linked encoder --- .../main/kotlin/uk.gibby.dsl/serialization/LinkedSerializer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/uk.gibby.dsl/serialization/LinkedSerializer.kt b/core/src/main/kotlin/uk.gibby.dsl/serialization/LinkedSerializer.kt index 6ad9c67..53a9174 100644 --- a/core/src/main/kotlin/uk.gibby.dsl/serialization/LinkedSerializer.kt +++ b/core/src/main/kotlin/uk.gibby.dsl/serialization/LinkedSerializer.kt @@ -43,7 +43,7 @@ class LinkedSerializer( override fun serialize(encoder: Encoder, value: Linked) { when(value) { - is Linked.Reference -> encoder.encodeStructure(descriptor) { encodeStringElement(descriptor, 0, value.id) } + is Linked.Reference -> encoder.encodeString(value.id) is Linked.Actual -> { encoder.encodeSerializableValue(tSerializer, value.result) }