json-ast-comments
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

json-ast-comments

parser json string (with comments) into json, stringify json to string(with comments)

usage

npm i json-ast-comments;
import { parse, stringify, parser } from "json-ast-comments";

const source = `
{
  // this is comments
  "a": 123
}
`;

const obj = parse(source);

console.log(obj);
console.log(stringify(obj));

const ast = parser.parse(source);
console.log(ast);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.1190latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.1190
1.1.013
1.0.92
1.0.81
1.0.72
1.0.61
1.0.51
1.0.41
1.0.11
1.0.01

Package Sidebar

Install

npm i json-ast-comments

Weekly Downloads

181

Version

1.1.1

License

ISC

Unpacked Size

54.1 kB

Total Files

9

Last publish

Collaborators

  • 2betop