encodeToString

abstract fun <T> encodeToString(serializer: SerializationStrategy<T>, value: T): String(source)

Serializes and encodes the given value to string using the given serializer.

Throws

in case of any encoding-specific error

if the encoded input does not comply format's specification