prc b6c02717e6 Upload complete no-internet building environment. | il y a 1 an | |
---|---|---|
.. | ||
test | il y a 1 an | |
.travis.yml | il y a 1 an | |
LICENSE | il y a 1 an | |
README.md | il y a 1 an | |
index.js | il y a 1 an | |
package.json | il y a 1 an |
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(Buffer.from('hello there!'))
console.log(JSONB.parse(str)) //GET a BUFFER back
MIT