Skip to content

elijahjcobb/better-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

better-json

This package adds some functionality to JSON.parse() and JSON.stringify() adding the ability to parse and stringify a Buffer object automatically recursively.

Example

import {BetterJSON} from "@elijahjcobb/better-json";

const obj: { email: string, security: { salt: Buffer, pepper: Buffer } } = {
    email: "Elijah",
    security: {
         salt: Buffer.from("salt"),
         pepper: Buffer.from("pepper")
    }
};

const str: string = BetterJSON.stringify(obj);
const obj2: { email: string, security: { salt: Buffer, pepper: Buffer } } = BetterJSON.parse(str);

// obj === obj2

Documentation

Everything is completely documented. You can view the declaration files or even the source code on GitHub.

Bugs

If you find any bugs please create an issue on GitHub or if you are old-fashioned email me at elijah@elijahcobb.com.

About

This package adds some functionality to JSON.parse() and JSON.stringify() adding the ability to parse and stringify a Buffer object automatically recursively.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published