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 those who use retrofit, you might want to consider using `JsonConfiguration(strictMode = false)` on the retrofit builder.

E.g:

```
// your retrofit builder
Retrofit.Builder()
        .baseUrl(url)
        .client(okHttpClient)
        .client(httpClient)
        .addConverterFactory(
          Json(JsonConfiguration(strictMode = false))
              .asConverterFactory(MediaType.get("application/json")
        )
)

```

Source: [issue on the kotlinx github](https://github.com/Kotlin/kotlinx.serialization/issues/169#issuecomment-529563939)