If space is your primary concern when using JSON that has you considering a binary representation, you should seriously consider using compression instead. Compression can yield similar savings to a binary representation, it is implemented with
gzip in most servers and HTTP clients, and can be added as a transparent layer after you've finished debugging your application. Here, we discuss adding object-body compression for JSON and other objects sent by the popular express server built on top of Node.js with the express module.
First, you need to make sure you've installed the express and compress modules:
npm install express npm install compression ...