Skip to content

wareset/json-parse-with-comments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
}

License

MIT

About

Parse JSON with comments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published