chrisdrakeford 9c87c1307d first commit | há 3 anos atrás | |
---|---|---|
.. | ||
test | há 3 anos atrás | |
.npmignore | há 3 anos atrás | |
.travis.yml | há 3 anos atrás | |
LICENSE | há 3 anos atrás | |
README.md | há 3 anos atrás | |
index.js | há 3 anos atrás | |
package.json | há 3 anos atrás |
JSON functions that can convert buffers!
JSON mangles buffers by converting to an array... which isn't helpful. json-buffers converts to base64 instead, and deconverts base64 to a buffer.
var JSONB = require('json-buffer')
var Buffer = require('buffer').Buffer
var str = JSONB.stringify(new Buffer('hello there!'))
console.log(JSONB.parse(str)) //GET a BUFFER back
MIT