Javascript protocol buffer implementation

588 views
Skip to first unread message

Patrick Horn

unread,
Feb 21, 2010, 4:39:39 AM2/21/10
to prot...@googlegroups.com
Hi all,
I am announcing a BSD-licensed javascript protocol buffer
implementation, called protojs. The library supports all wire types, as
well as packed fields (not autodetection yet), float/double support
thanks to jsfromhell.com, and Unicode support.

You can find the github site here:
http://github.com/sirikata/protojs

To install, you need to run ./bootstrap.sh to download and compile
antlr, and then run "make" to build the "pbj" compiler and compile the
sample javascript code.

Protojs also supports higher level types, such as enums, nested
composites, and precise 64-bit integers (using two 32-bit numbers). It
also allows extending the built-in types, and has a library called "pbj"
which includes other helpful types, such as vectors, quaternions and uuids.

The library is modelled after python's protocol buffers (same function
names). It uses getters and setters on browsers that support them (all
but IE), and works without getters and setters at the expense of no
runtime type checking.

Sadly, javascript currently has no binary datatype. So in place of that
the library currently supports serializing/deserializing base64 strings
and to arrays of integers.

Feel free to let me know if you have any suggestions or bugs, or you can
fork the project since it's developed in git.

-Patrick

Kenton Varda

unread,
Feb 22, 2010, 6:17:26 PM2/22/10
to Patrick Horn, prot...@googlegroups.com
Cool, added to the list:

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.


Reply all
Reply to author
Forward
0 new messages