Serializing Kotlin data class for persistent storage?

Answered

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

0
1 comment

Please share your PersistentStateComponent code

 

0

Please sign in to leave a comment.