{"name":"jsonc-simple-parser","description":"A simple JSON parser that supports comments and optional trailing commas.","version":"1.0.1","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"benchmark":"node tasks/benchmark.js","clean":"rimraf dist","compile":"tsc --skipLibCheck && tstei","compile:watch":"tsc --skipLibCheck --watch","test:test262:init":"git clone git@github.com:tc39/test262.git ./test/test262","test:test262:prelude":"{ echo 'var module = {}, exports = {};' && esbuild dist/index.js --bundle --format=cjs --minify --target=es2016 && echo 'JSON.parse=module.exports.default.parse;' } > test/test262/prelude.js","test:test262:run":"test262-harness -t 8 --prelude ./test/test262/prelude.js ./test/test262/test/built-ins/JSON/parse/*.js","test:test262":"npm run test:test262:prelude && npm run test:test262:run","test:lib":"ava","test:lib:watch":"ava --watch","test":"npm run test:test262 && npm run test:lib","prepublishOnly":"npm run clean && npm run compile && npm run test"},"ava":{"files":["test/index.js"]},"bugs":{"url":"https://github.com/fabiospampinato/jsonc-simple-parser/issues"},"license":"MIT","author":{"name":"Fabio Spampinato","email":"spampinabio@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/jsonc-simple-parser.git"},"keywords":["jsonc","json","comments","trailing commas","commas","parser","parse","stringify","tiny","simple"],"dependencies":{"reghex":"^3.0.0"},"devDependencies":{"@types/node":"^14.14.32","ava":"^2.4.0","ava-spec":"^1.1.1","benchloop":"^1.3.2","esbuild":"^0.8.57","json5":"^2.2.0","jsonc-parser":"^3.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","test262-harness":"^7.5.2","typescript":"^4.2.3","typescript-transform-export-interop":"^1.0.2"},"gitHead":"d6de58547751295775e23edccc52bfd484885a63","homepage":"https://github.com/fabiospampinato/jsonc-simple-parser#readme","_id":"jsonc-simple-parser@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"integrity":"sha512-x4zU03tayb1wBORmdSntVcR6WrWqvdavIWeG1z+AER/ZKZ1AxOgYhBGlu6zDi7GoZrFxzwRZ0V59gbCOZe4I9g==","shasum":"bdd82bf7e8eb40f9ef9857a03f55a6afd2bfe307","tarball":"http://registry-npm.ywwl.com/jsonc-simple-parser/download/jsonc-simple-parser-1.0.1.tgz","fileCount":18,"unpackedSize":202073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSN1YCRA9TVsSAnZWagAAGRwQAJ+CL7F1QcuSaaHAjCsB\noCKbkFQZEJt5MLj1EuNiXkn2VSKzJYZmr07jeY6uNU9AtMw0nCKgStblmQX6\nYg3KiqY/IHfyeFHIBgPjPGkdw8xvDEI/j9byLMn2/sqetae/l7s1vPGIcCcN\nE7vQAHQbH7ipE+SYsLVzw2eioE9J/UPK7vwqM9AirCp2PuiBcVgKhn4KzgIT\nbgR5+gTStoY5N5beEzqv1X3cpzaKbwHMKP01j0nYJx718OTs+SukEVUSjFfG\nXrxnwCMsJ4OU8nHeKsJTYpsHYPN8ZeuBv5sAVV0E2e0cJpuwFh/cFPAPxk2k\nn9xnchthwGsoaYP24zTeguGcCOoztQ2NA7bwsoEURcvvsngWIhXyPigp+Ipn\nKe1POJEUAirvmSndyMatnS+XiCvdub9Lfu1fVAIGmNIBP0F5qQns7jPflVxo\n3+ndDmW8rFX1XzqgQXvDqCNcwFeMPYs/I+qitWtAsEiywBrCAIzNy3HIvP6P\n5OZ4xZn88ZLRrLXdGb06CnVjw9dipTf1VX16dSNtDTLWHb6NwhbqA8PBx4RU\nIKDaEObzJYzXC+bdjLv6NT+LYvTP5zuJA73BmYBOTdmCdCtMc3HrmqkyTlUr\nsbhtcZ2QNARV//rmW9eiIXigewbg+wU0j8APhmEwZRPXvuMZpqV2/CHGTbrT\nUxEf\r\n=Y9m/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3apKJWCsGcFZAEmuhpnrmIG5db/uiDEwCEUeeKZty0AIhAJJXXo98Rt+12m0KHYCy5kyLyUUgOLnrjl+CNKjBA5TZ"}],"size":51908,"noattachment":false,"key":"/jsonc-simple-parser/-/jsonc-simple-parser-1.0.1.tgz"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsonc-simple-parser_1.0.1_1615387992279_0.20506717337520453"},"_hasShrinkwrap":false,"readme":"# JSONC Simple Parser\n\nA simple JSON parser that supports comments and optional trailing commas.\n\n## Features\n\n- **Tiny**:\n  - It's ~3.5kb minified and gzipped, if you aren't already using [RegHex](https://github.com/kitten/reghex), otherwise it's just ~2kb.\n  - Even if you aren't using [RegHex](https://github.com/kitten/reghex) already (you should) that's ~32% smaller than VS Code's [jsonc-parser](https://www.npmjs.com/package/jsonc-parser) and ~62% smaller than [JSON5](https://www.npmjs.com/package/json5).\n- **Performant**:\n  - When parsing regular JSON it's ~10x faster than VS Code's [jsonc-parser](https://www.npmjs.com/package/jsonc-parser), ~70x faster than [JSON5](https://www.npmjs.com/package/json5) and just as fast as the native `JSON.parse`.\n  - When parsing JSON with comments or trailing commas it's just as fast as VS Code's [jsonc-parser](https://www.npmjs.com/package/jsonc-parser) and ~6x faster than [JSON5](https://www.npmjs.com/package/json5).\n- **Tested**:\n  - It passes all 274 tests regarding JSON from ECMA's [test262](https://github.com/tc39/test262) test suite.\n  - The parser is obviously not spec compliant but this means that while adding support for comments and trailing commas probably nothing else got broken.\n\n## Install\n\n```sh\nnpm install --save jsonc-simple-parser\n```\n\n## Usage\n\n```ts\nimport JSONC from 'jsonc-simple-parser';\n\nconst source = `\n  { // This is an example\n    \"foo\": 123,\n    /* TRAILING COMMAS */\n    \"bar\": [1, 2, 3,],\n  }\n`;\n\nconst result = {\n  foo: 123,\n  bar: [1, 2, 3]\n};\n\nJSONC.parse ( source ); // => returns an object that's deeply equal to `result`\nJSONC.stringify ( result ); // => same as calling `JSON.stringify`\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1615387992461,"_cnpm_publish_time":1615387992461,"dist-tags":{"latest":"3.0.0"}}