square/retrofit

[Kotlinx Serialization Converter] Shouldn't it support also stringConverter?

Opened this issue · 1 comments

Hi,
my question is if retrofit2.converter.kotlinx.serialization.Factory should support by default or configurable stringConverter. By default it returns null which means that for example query parameters which are enums are serialized using toString. This might be confusing as not everyone are aware what is inside such converter.

If you serialize an enum with something like Json, you'll get "TheName" as opposed to TheName which likely will surprise people. This has come up a lot in the past, which you can see by searching "quotes" in the closed issues.

I don't really want to enable this by default (for any converter), but I'm not opposed to adding a helper to enable it for text-based formats.