Laxystem
05/27/2024, 2:07 PMLaxystem
05/27/2024, 3:44 PM["example"]
Adam S
05/27/2024, 5:53 PMLaxystem
05/28/2024, 3:55 PMLaxystem
05/28/2024, 4:56 PMFunctional
(a tuple of one), and Primitive
(converts { "@value": "etc" }
to "etc"
).
However, when using Functional<Primitive<String>>
, I get the following error:
kotlinx.serialization.json.internal.JsonDecodingException: Expected class kotlinx.serialization.json.JsonObject as the serialized body of quest.laxla.khuzdul.Primitive, but had class kotlinx.serialization.json.JsonArray
Laxystem
05/28/2024, 4:57 PM[{"@value": "etc"}]
to "etc"
Laxystem
05/28/2024, 5:05 PMLaxystem
05/28/2024, 5:05 PMLaxystem
05/28/2024, 5:10 PMLaxystem
05/28/2024, 5:14 PMLaxystem
05/28/2024, 5:14 PMLaxystem
05/28/2024, 5:14 PMLaxystem
05/28/2024, 5:15 PMLaxystem
05/28/2024, 5:16 PMExpected class kotlinx.serialization.json.JsonObject as the serialized body of quest.laxla.khuzdul.Primitive, but had class kotlinx.serialization.json.JsonArray
Laxystem
05/28/2024, 5:16 PMAdam S
05/28/2024, 5:17 PMencoder.encodeStructure
along with encoder.encodeSerializableValue
looks suspect to meLaxystem
05/28/2024, 5:17 PMLaxystem
05/28/2024, 5:18 PMAdam S
05/28/2024, 5:18 PMencoder.encodeStructure
to do everything manually.... that is to say, I don't use it because doing it manually is a hassle :)Laxystem
05/28/2024, 5:20 PMAdam S
05/28/2024, 5:20 PMencodeSerializableValue
inside of encodeStructure
, I think there will be an encodeElement(...)
instead?Laxystem
05/28/2024, 5:21 PMAdam S
05/28/2024, 5:22 PMLaxystem
05/28/2024, 5:22 PMLaxystem
05/28/2024, 5:23 PMAdam S
05/28/2024, 5:24 PMencodeSerializableElement
should use the descriptor of the value, not the descriptor of your Functional/Primitive Serializers?Laxystem
05/28/2024, 5:24 PMLaxystem
05/28/2024, 5:24 PMLaxystem
05/28/2024, 5:24 PMLaxystem
05/28/2024, 5:26 PMLaxystem
05/28/2024, 5:27 PMLaxystem
05/28/2024, 5:59 PMLaxystem
05/28/2024, 5:59 PMLaxystem
05/28/2024, 5:59 PM