pretty

fun <T> pretty(value: T, serializer: KSerializer<T>): String(source)

Serializes the given value into a pretty-printed JSON string using the provided serializer.

Return

A pretty-printed JSON string representation of the given value.

Parameters

T

The type of the value to be serialized.

value

The value to serialize into a pretty-printed JSON string.

serializer

The serializer used to convert the value into JSON format.


inline fun <T> pretty(value: T): String(source)

Converts the given value into a pretty-printed JSON string representation.

Return

A pretty-printed JSON string representation of the provided value.

Parameters

T

The type of the value to be converted.

value

The value to be serialized and formatted as a pretty JSON string.