jsonConfig

fun jsonConfig(block: JsonBuilder.() -> Unit): DeepSeekClientBase.Builder

Configures the JSON serialization and deserialization settings.

The block receives a JsonBuilder and is applied on top of the current jsonConfig, preserving previously-set fields. The resulting Json is used by the HTTP client built in DeepSeekClient.Builder.build / DeepSeekClientStream.Builder.build.

Example:

val client = DeepSeekClient("token") {
jsonConfig {
prettyPrint = false
ignoreUnknownKeys = true
}
}

Return

This builder for chaining

Parameters

block

Configuration block receiving a JsonBuilder


Replaces the JSON configuration with the provided instance.

The given json is used as-is by the HTTP client's content negotiation. Any previous jsonConfig settings are discarded.

Return

This builder for chaining

Parameters

json

Fully configured Json instance