4 ms·
That's not correct -- Protocol buffers differ from both JSON and TJSON because the schema isn't part of the protocol. That is, the information on the wire does
by chubot 10y ago
That's not correct -- Protocol buffers differ from both JSON and TJSON because the schema isn't part of the protocol.
That is, the information on the wire doesn't contain enough information to interpret the data -- the schema has to be compiled into or otherwise included in the binary to know what the data means. That's not the case with JSON or TJSON.
- bascule 10y agoYes, this is a very important point, (T)JSON is self-describing in ways protobufs or other similar on-the-wire formats are not. Making sense of a protobuf involves both knowing what type of protobuf you're looking at in advance (protobufs are NOT self-identifying) and loading the corresponding schema. Otherwise each member of a protobuf is identified by an integer, so good luck guessing what each field represents.