AJNB 376d9cfaf8 hjj | hace 2 meses | |
---|---|---|
.. | ||
test | hace 2 meses | |
.travis.yml | hace 2 meses | |
LICENSE | hace 2 meses | |
README.md | hace 2 meses | |
index.js | hace 2 meses | |
package.json | hace 2 meses |
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