Piotr Krzemiński
12/03/2023, 9:48 PMencodeToString
with an object of type Map<String, Boolean>
. I now pass
MapSerializer(String.serializer(), Boolean.serializer())
as the first argument to make it work, but I'm fairly sure there's a way for the compiler to infer it. Is there (without creating a wrapper type annotated with @Serializable
)? 🙂kevin.cianfarini
12/03/2023, 9:51 PMencodeToString
which takes a reified type parameter and then uses reflection to look up the type's serializers.
This comes at a performance penalty though.Piotr Krzemiński
12/03/2023, 9:54 PMephemient
12/03/2023, 11:25 PMkevin.cianfarini
12/09/2023, 3:11 PM