stringFormat

fun <T : StringFormat> stringFormat(forHumans: Boolean = false, fileFormat: FileFormat<T>, serializersModuleBuilder: SerializersModuleBuilder.() -> Unit? = null): T

Creates a StringFormat instance based on the specified fileFormat and configuration.

Return

A T instance configured according to the specified parameters.

Parameters

forHumans

If true, configures the format for human-readable output; otherwise, for machine-readable output.

fileFormat

The FileFormat instance to use for creating the StringFormat.

serializersModuleBuilder

An optional builder to add custom serializers.

See also