Serializing Kotlin data class for persistent storage?


I've implemented a PersistentStateComponent class with various properties. The primitive typed properties store and restore successfully. 

However, if the property is a Kotlin data class it does not get stored. I've tried a few approaches to alternate serialization unsuccessfully. In my XML storage I see:

 <option name="myPropName">
<MyDataClass />

How can I correctly serialize this?




Please sign in to leave a comment.