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: 
After Kotlin **1.4.0** released:

use this for converting string to Object:

```kotlin
val response = Json {
    ignoreUnknownKeys = true
}.decodeFromString(ResponseObject.serializer(), jsonString)

```

And for your httpClient use:

```
HttpClient {
    install(JsonFeature) {
        serializer = KotlinxSerializer()
    }
    install(Logging) {
        logger = Logger.DEFAULT
        level = LogLevel.ALL
    }
}

```
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
            }
        }

```