1.0.1 • Published 10 months ago

@ryantipps/json-utils v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

JSON Utils

Installation

npm install @ryantipps/json-utils

Usage

import { analyzeJson } from '@ryantipps/json-utils';

const jsonString = '{"foo": "bar"}';
const analysis = analyzeJson(jsonString);

// use as needed
analysis.status; // reflects if input string is valid JSON, invalid JSON, or empty
analysis.error; // error message from string parser
analysis.tree; // tree representation of the JSON
analysis.metadata; // words, lines, chars, tokens, size
1.0.1

10 months ago

1.0.0

10 months ago