JavaScript

139 views
Skip to first unread message

rthompson....@gmail.com

unread,
Jun 25, 2009, 6:23:40 PM6/25/09
to Protocol Buffers
Is there anything in the works that would allow us to output
JavaScript along with C++, Java, and Python?

Marc Gravell

unread,
Jun 25, 2009, 6:53:36 PM6/25/09
to Protocol Buffers
I haven't tried it, but http://code.google.com/p/protobuf/wiki/OtherLanguages
lists javascript support here: http://code.google.com/p/protobuf-js/

(this is one of many unofficial independent implementations - not
google's; don't blame them ;-p)

Marc

Alek Storm

unread,
Jun 25, 2009, 7:42:24 PM6/25/09
to Marc Gravell, Protocol Buffers
That one doesn't look complete.  I've got one that almost is.
--
Alek Storm

Kenton Varda

unread,
Jun 25, 2009, 8:17:58 PM6/25/09
to rthompson....@gmail.com, Protocol Buffers
One problem with javascript and protobuf is that you need a lot of support code to parse the messages.  Unless you end up sending quite a lot of stuff back and forth, making the user download a JS protobuf codec library may be a net loss.  It may be better to use JSON or XML because browsers already have built-in support for those.

That said, I think various people inside google have been playing with javascript + protocol buffers for awhile and if we end up with anything that works well enough, we'll release it.

Leo Gallucci

unread,
Mar 23, 2015, 1:09:19 PM3/23/15
to prot...@googlegroups.com, rthompson....@gmail.com
Almost 6 years later, what do you think about this now? What about using https://github.com/dcodeIO/ProtoBuf.js ? or is it still more convenient to simply stick to JSON/BSON/PSON?

--
Leo

Timo K

unread,
Mar 24, 2015, 8:31:24 PM3/24/15
to prot...@googlegroups.com
I am just using  https://github.com/dcodeIO/ProtoBuf.js right now. I use it for piping the internal protobuffer communication over websockets and it just works like a charm.
Reply all
Reply to author
Forward
0 new messages