I try to use
Gson to serialize a kotlin-singleton.
For some reason it’s direct members (
val x: String = "") are serialized and deserialized correctly, but nested members, like
val x: OtherType are skipped.
When I change the declaration from
object MyClass to regular
class MyClass it works as intended.
Can anyone point me in a direction here?