Binary serialization for JavaScript objects


One particular mechanism I find lacking in JavaScript is an easy, reusable, way to parse binary data. I have leveraged custom attributes in the past with .NET. JavaScript does not provide custom attributes. One means of specifying the format of binary data is to use JSON. I tend to favor declarative mechanisms for writing reusable code.

I like it better when I can leverage open source code. Cross-pollination of ideas from other language communities can also provide interesting design ideas. I found the following that I may use, instead of writing my own parser/serializer:

If you are looking for something similar for Ruby, you can take a look at BinData. I’ll be updating this post as my work on this topic broadens. Check back.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s