DEV Community

Discussion on: Is Protobufs better than JSON?

Collapse
 
elasticrash profile image
Stefanos Kouroupis

There is no doubt it's faster, but the question is ...should I compare it with JSON? JSON can have any schema you want, it can be dynamic and it's easy to modify.
if the consumer app is a javascript based app it can make assumptions about the data structure or even extract the schema etc...whereas in protobufs you need a predefined schema, which you cannot carry with you and you need to share it with other consumer services beforehand.