ktor icon indicating copy to clipboard operation
ktor copied to clipboard

ContentConverter for Protobuf

Open YuriDenison opened this issue 5 years ago • 2 comments

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

YuriDenison avatar Aug 11 '18 13:08 YuriDenison

+1 ideally via https://github.com/Kotlin/kotlinx.serialization ..?!

hartmut-co-uk avatar Nov 07 '18 20:11 hartmut-co-uk

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

oleg-larshin avatar Aug 10 '20 15:08 oleg-larshin