Kotlin / kotlinx.serialization

Kotlin multiplatform / multi-format serialization
Apache License 2.0
5.44k stars 624 forks source link

Kotlin x serialization converter for retrofit #2296

Closed lewan42 closed 1 year ago

lewan42 commented 1 year ago

hello, i want to use kotlin serialization with retrofit, but i don't understand how can I get a converter. When i used Gson -> .addConverterFactory(GsonConverterFactory.create(GsonBuilder().setLenient().create()))

Please tell me, is it possible to set a converter?

JakeWharton commented 1 year ago

Please see https://github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/ whose readme details how to set this up. In the future, consider asking general usage questions on StackOverflow or the Kotlinlang Slack instance.

lewan42 commented 1 year ago

I saw this repository, I was confused that this implementation is supplied separately.

Thank you

JakeWharton commented 1 year ago

Details as to why are available in https://github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/issues/58