Question: I'm trying to initialize Ktor http client and setup json serialization. I need to allow non-strict deserialization which **JSON.nonstrict** object allows. Just can't get how to apply this setting to serializer.

```
 val client = HttpClient {
                install(JsonFeature) {
                    serializer = KotlinxSerializer()                    
                }
        }

```

Answer: 
This change very often, but with Kotlin 1.4.10 and Ktor 1.4.1 you need to pass a **kotlinx** Json (be careful because there is also a `io.ktor.client.features.json.Json`, I used an import alias to distinguish them because I needed both `import kotlinx.serialization.json.Json as KotlinJson`)

```
val client = HttpClient {
    install(JsonFeature) {
        serializer = KotlinxSerializer(KotlinJson { ignoreUnknownKeys = true })
    }
    ...

```
For ktor 2.0+

```kotlin
        return HttpClient(CIO) {
            engine {
                maxConnectionsCount = 10
            }

            install(ContentNegotiation) {
                json(kotlinx.serialization.json.Json {
                    ignoreUnknownKeys = true
                })
            }

            install(HttpTimeout) {
                requestTimeoutMillis = 1000L
                connectTimeoutMillis = 1000L
                socketTimeoutMillis = 1000L
            }
        }

```