main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
659 bytes
|
Line | |
---|
1 | # json-buffer
|
---|
2 |
|
---|
3 | JSON functions that can convert buffers!
|
---|
4 |
|
---|
5 | [![build status](https://secure.travis-ci.org/dominictarr/json-buffer.png)](http://travis-ci.org/dominictarr/json-buffer)
|
---|
6 |
|
---|
7 | [![testling badge](https://ci.testling.com/dominictarr/json-buffer.png)](https://ci.testling.com/dominictarr/json-buffer)
|
---|
8 |
|
---|
9 | JSON mangles buffers by converting to an array...
|
---|
10 | which isn't helpful. json-buffers converts to base64 instead,
|
---|
11 | and deconverts base64 to a buffer.
|
---|
12 |
|
---|
13 | ``` js
|
---|
14 | var JSONB = require('json-buffer')
|
---|
15 | var Buffer = require('buffer').Buffer
|
---|
16 |
|
---|
17 | var str = JSONB.stringify(Buffer.from('hello there!'))
|
---|
18 |
|
---|
19 | console.log(JSONB.parse(str)) //GET a BUFFER back
|
---|
20 | ```
|
---|
21 |
|
---|
22 | ## License
|
---|
23 |
|
---|
24 | MIT
|
---|
Note:
See
TracBrowser
for help on using the repository browser.