json

fun json(forHumans: Boolean = false, serializersModuleBuilder: SerializersModuleBuilder.() -> Unit? = null): Json

Creates a Json instance based on the jsonFileFormat.

Return

A Json instance configured according to the specified parameters.

Parameters

forHumans

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

serializersModuleBuilder

An optional builder to add custom serializers.

See also