encodeToStringMap

fun <T> encodeToStringMap(serializer: SerializationStrategy<T>, value: T): Map<String, String>

Encodes properties from the given value to a map using the given serializer. Converts all primitive types to String using toString method. null values are omitted from the output.