-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Be able to change the default SerializersModule #230
Comments
For now there is no way to define custom serializer modules. You can of course just stick to dynamic/text and serialize/deserialize the data externally. But I think it should be fairly easy to add support for this in the next release by adding an optional parameter to the |
At the moment I just created a RestClient function extension with a paste copy of remoteCall() and add a parameter for the SerializerModule. |
It could be useful for input data serialization as well, so I think it would be easier to make it available for all methods. |
Released with 4.0.0 |
Hello,
I have a Get rest call that I can receive two types of data:
B
orC
.B
andC
are children ofA
.A
is an abstract class. There is no serialization / deserialization problem on the JVM. But with Kotlin/JS I need to register my subclasses in aSerializersModule
like this :Cf : Kotlin/kotlinx.serialization#1077
After registering my module in a Json instance, I can easily deserialize my object in Kotlin/JS env like this :
So I would like to change default SerializersModule of an instance of RestClient.
Is it possible or can this feature be implemented?
Or do you have a better solution?
The text was updated successfully, but these errors were encountered: