json-parse-with-comments
v1.0.0
Published
Parse JSON with comments
Downloads
2
Readme
json-parse-with-comments
Parse JSON with comments
Usage:
import parse from 'json-parse-with-comments'
const source = `
{
"foo": true, // Line comments
/*
Block comments
*/
"bar": 42
}
`;
const res = parse(source)
console.log(res)
// res:
{
foo: true,
bar: 42
}