Hello, I have a Java library and a Koltin library is depending on the Java library.
In the java library I have a class,
Foo.java
, Is that possible I can to mark it
@Serializable (with = ContextualSerializer<Foo>.class)
in side of Java, then use this
Foo.java
in my Kotlin library as it is
Serializable
, where inside of the Kotlin library, I define the
SerializerModule
(build a contextual serializer for Foo.java class and also a list of other classes), and then pass the
SerializerModule
to my custom ktxEncoder/ktxDecoder;
The key point for me to doing this is to avoid define a Kotlin serializer for
Foo.java
in my Java library (we are trying to have at least Kotlin file in the Java lib as possible).
Also trying to avoid the
@Contextual
annotation for my customers;