Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON

json decoder & encoder

Usage

const assert = require('assert');
const {encode,decode} = require('../main.js');

const json = {
    string: 'hello world',
    number: 100,
    arr: [1,6,"hello"],
    date: new Date(),
    buf: new Buffer('hello world')
};
  
const jsonStr = encode(json);
const obj = decode(jsonStr);

assert.deepEqual(json,obj);

test

$ npm run test

About

json decoder & encoder

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages