Has anyone used protobuf for their rest apis?
# android-architecture
u
Has anyone used protobuf for their rest apis?
t
REST is HTTP by definition, so no one probably.
u
what? as payload format
as alternative to json
s
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
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
Would that be gRPC?
k
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
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