Joshua Hansen
06/04/2024, 3:28 PM@Serializable(with=CustomSerializer::class)
class Outer(val x: Int, val y: String) {
val z: AnotherClass = AnotherClass(this)
}
My CustomSerializer simply serializes AnotherClass. That is to say, the serialized form of Outer is simply the serialization of AnotherClass. (Deserialization is obviously not supported).
Is there any way to have this work with AnotherClass being an inner class? I'd prefer to have AnotherClass get the reference to Outer by just being an inner class, rather than having to pass in this.