rharter/ktor-moshi

Why add a wrapper to Moshi?

Opened this issue · 1 comments

I'm still new to Ktor, but familiar with Kotlin and Gradle in general.
If we want to use Moshi as a dependency in a Ktor project, why do we add this library instead of the actual one?
What is this library doing exactly?

Hi @manideepl. The library is useful as it allows you to use Moshi with the ContentNegotiation feature of ktor.

If you were to use moshi on its own without the use of this (or similar) library, you would have to serialize a response manually and send it back. The library saves you from that work.

PS: I am using the library. I am not a contributor or owner of the repo