Skip to content

SudoDotDog/Sudoo-JSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoo-JSON

Continuous Integration codecov npm version downloads

JSON tools

Install

yarn add @sudoo/json
# Or
npm install @sudoo/json --save

Parse

import { JSONParser } from "@sudoo/json";

const parser: JSONParser = JSONParser.from(`{
    "hello": "world"
}`);

parser.parseOrThrow(); // Return Object if Valid, Throw Error if invalid
parser.parseOrDefault({
    hello: "nothing",
}); // Return Object if Valid, Default if invalid

Stringify

import { JSONStringifier } from "@sudoo/json";

const stringifier: JSONStringifier = JSONStringifier.from({
    hello: "world",
});

parser.stringify(); // Stringify
parser.stringify(2); // Stringify with space

About

🌁 JSON Tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •