https://kotlinlang.org logo
#serialization
Title
# serialization
z

zt

02/27/2023, 5:25 AM
Copy code
abstract class Test {
  abstract val a: @Serializable(Serializer::class) String
}
  
private class Serializer : KSerializer<String>(String.serializer()) {
    override val descriptor: SerialDescriptor
        get() = TODO("Not yet implemented")

    override fun deserialize(decoder: Decoder): String {
        TODO("Not yet implemented")
    }

    override fun serialize(encoder: Encoder, value: String) {
        TODO("Not yet implemented")
    }
}

class TestImpl(override val a: String) : Test()
Would the Serializer annotation applied to the property still take effect in the implementation from TestImpl?
5 Views