ktor
ktor copied to clipboard
ContentConverter for Protobuf
Currently only JSON converters supported out of the box (Gson, Jackson) It would be nice to have Protobuf converter to be able to use (kotlin + retrofit + protobuf) on android client side and (ktor + protobuf) on server side.
It is quite common use case to migrate from Json to Protobuf in mobile projects in case of large amount of small objects passing to requests/responses. The reasons are simple - improved parsing performance, lower CPU usage than gson/jackson, fixed protocol, api versioning etc.
On Android client side Retrofit supported Proto converter more than a year ago - https://github.com/square/retrofit/blob/master/retrofit-converters/protobuf/src/main/java/retrofit2/converter/protobuf/ProtoConverterFactory.java
+1 ideally via https://github.com/Kotlin/kotlinx.serialization ..?!
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.