serialize

abstract fun serialize(preferences: P): String

Serialize P into a JSON string.