https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
u

ursus

04/13/2020, 9:10 AM
Has anyone used protobuf for their rest apis?
t

tschuchort

04/13/2020, 10:20 AM
REST is HTTP by definition, so no one probably.
u

ursus

04/13/2020, 10:46 AM
what? as payload format
as alternative to json
s

streetsofboston

04/13/2020, 12:34 PM
Protobuf has probably been used by quite a few folks and teams. There are, if you use Retrofit, Retfrofit converters for the format. https://github.com/square/retrofit/tree/master/retrofit-converters/protobuf
u

ursus

04/13/2020, 12:47 PM
right, I mostly wanted a follow up question, that,
protobuf is just a serialization format, but I've seen people declaring api methods, request params etc in sort of protobuf looking syntax
a

Anders Oedlund

04/13/2020, 8:58 PM
Would that be gRPC?
k

kevindmoore

04/14/2020, 12:12 AM
My understanding is that the backend defines their API in a protobuf type language that can then be used to generate different outputs for the different platforms. (But my knowledge is pretty limited)
u

ursus

04/14/2020, 1:06 PM
I hear people talking about backend team publishing some binary which encodes all of api + models, is that grpc?
does grpc generates the retrofit stuff on android them also? I presume its some other tool right
6 Views