Hi Feng,
As far I know, protobuf wire format does not have much of an advantage
over JSON format on web apps because the payload is usually small enough
and encoding/decoding protobuf wire format with Javascript does not
necessarily have a better performance than the built-in JSON
encoder/decoder.
Protobuf has a big advantage over JSON for some web apps. In particular,
when you are transferring big amounts of data. In our use case (client-side
WebGL vector maps https://www.mapbox.com/blog/mapbox-gl-js/, with lots of
numeric data on the wire), Protobuf provides about 2-3 smaller gzipped
sizes compared to JSON. In addition, it is much faster to decode —
`JSON.parse` parses the data all at once due to the arbitrarily nested
nature of JSON, while with Protobuf, you can parse data sequentially, chunk
by chunk.
--
You received this message because you are subscribed to the Google Groups
Protocol Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.