serialize

abstract fun serialize(value: T): String?

Serialize the value to a String. The result will be used with SharedPreferences.Editor.putString.