json没有注释!!!

json去注释

json去注释

1.安装strip-json-comment

$ npm install --global strip-json-comments-cli

2.使用说明

Usage
$ strip-json-comments --help

  Usage
    $ strip-json-comments <input-file> > <output-file>
    $ strip-json-comments < <input-string>

  Options
    --no-whitespace  Remove comments instead of replacing them with whitespace

  Example
    $ strip-json-comments input.json > output.json

3.使用示例

strip-json-comments input.json > output.json

相关链接

https://github.com/sindresorhus/strip-json-comments-cli
https://github.com/sindresorhus/strip-json-comments

相关文章: