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: 
You can specify json configurations using the Json builder, which you pass into the KotlinxSerializer.

```
val client = HttpClient {
    install(JsonFeature) {
        serializer = KotlinxSerializer(Json {
            isLenient = true
            ignoreUnknownKeys = true
        })                    
    }
}

```

The exact fields for the Json builder is experimental and subject to change, so check out the [source code here.](https://github.com/ktorio/ktor/blob/master/ktor-features/ktor-serialization/jvm/src/io/ktor/serialization/JsonSupport.kt#L48)
With the "1.0.0RC" version, the use with retrofit is as follows.

```
Retrofit.Builder()
        .client(okHttpClient)
        .baseUrl(Env.BASE_URL)
        .addConverterFactory(Json{
            isLenient = true
            ignoreUnknownKeys = true
        }.asConverterFactory(MediaType.get("application/json")))
        .addCallAdapterFactory(CoroutineCallAdapterFactory())
        .build()

```