json-multibuffer-stream
Transform stream that encodes JSON data as multibuffers.
usage
var jsonBuffStream = var jsonEncoder = fs
optional arguments: jsonBuffStream(headers, onRow)
var encoder = { // gets called on every row with the json data right before it gets encoded}
you can also pass in a custom headers array to control how the resulting multibuffer is encoded
var headers = 'z' 'x' 'y'var encoder = encoder// multibuffer will be something like [3,2,1]
you can write either JSON strings or JavaScript objects to the stream. JSON strings will get JSON.parse()'d
use a multibuffer-stream .unpackStream()
to decode the data on the other end