Home > node-keyjson

node-keyjson

Node-keyjson is a project mainly written in PYTHON and JAVASCRIPT, it's free.

a binary JSON encoding whose byte-strings have an awesome property

What is keyjson?

It's awesome. See keyjson.org

Installing

npm install keyjson

Usage / API

"Software using Semantic Versioning MUST declare a public API. [...]
However it is done, it should be precise and comprehensive."

"Version 1.0.0 defines the public API"

The following plus keyjson.org should be precise and comprehensive enough:

keyjson = require('keyjson');

{stringify,parse}

buffer = keyjson.stringify(['enwiki', 'Hacker News', 1729000]);
x = keyjson.parse(buffer);

b64{en,de}code

string = keyjson.b64encode(buffer_or_array_of_octets);
buffer = keyjson.b64decode(string_or_buffer); // padding is not optional.

{stringify,parse}64

keyjson.stringify64(x) == keyjson.b64encode(
                            keyjson.stringify(x))

keyjson.parse64(sb) == keyjson.parse(
                            keyjson.b64decode(sb))

Developing

Prereqs

  • PYXC-PJ (with its repo on your PYTHONPATH)
  • Closure Compiler (with CLOSURE_JAR pointing to its .jar)
python make.py
node test.js
Previous:alfresco-dep