Serializing Kotlin data class for persistent storage?

Hi,

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 />
</option>

How can I correctly serialize this?

 

Thanks!

hm

Please sign in to leave a comment.