I get a list back from API call, so I have a kotli...
# ktor
s
I get a list back from API call, so I have a kotlinxSerializer where I am registering two lists, as val kotlinxSerializer = KotlinxSerializer() kotlinxSerializer.register(FirstList.serializer().list) kotlinxSerializer.register(SecondList.serializer().list) However, when I make the call, only the last registered serializer is used. How can I register multiple lists to the serializer?
e
Hi @Santosh Astagi, you could try
registerList
method 🙂
s
I tried, does it work for you, how do I register multiple with a single command. I could not.
e
You could call
registerList
twice. Could you provide the code sample?
s
registerList(NameOfClass.serializer().list())
Sorry for late response.
e
No problem. Could you try
registerList(NameOfClass.serializer())
instead?
s
Tried, didn't work.
Have you tried if it works for you, we are still seeing only on get registered. For better reference, here is a bug I filed with ktor: