I’ll give you one example where the protobuf design helped out a lot: GWT Protobuffers. The GWT Compiler has a version of Protobufs that transpiles all of the protos into Overlay types of naked JSON objects.
You get a statically typed Java interface, but underneath it a raw JSON object, and deserializing the proto is basically JSON.parse() + a cast.
You get a statically typed Java interface, but underneath it a raw JSON object, and deserializing the proto is basically JSON.parse() + a cast.
e.g. something like this
MyProto foo = MessageDeserializer.deserialize(serializedProto); console.log(foo.getFieldFoo());
compiles to this JS:
var foo = JSON.parse(serializedProto); console.log(foo[1]);