{"name":"jsonc-simple-parser","description":"A simple JSON parser that supports comments and optional trailing commas.","version":"2.2.0","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 && rm ./test/test262/test/built-ins/JSON/parse/name.js","test:test262:prelude":"{ echo 'var module = {}, exports = {};' && esbuild dist/index.js --bundle --format=cjs --minify --target=es2016 && echo 'JSON.parse=module.exports.default.parse;JSON.stringify=module.exports.default.stringify;' } > test/test262/prelude.js","test:test262:execute":"test262-harness -t 8 --prelude ./test/test262/prelude.js ./test/test262/test/built-ins/JSON/parse/*.js ./test/test262/test/built-ins/JSON/stringify/*.js","test:test262":"npm run test:test262:prelude && npm run test:test262:execute","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/lib/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"],"engines":{"node":">=11.0.0"},"dependencies":{"reghex":"^3.0.0"},"devDependencies":{"ava":"^2.4.0","ava-spec":"^1.1.1","benchloop":"^1.3.2","esbuild":"^0.9.3","json5":"^2.2.0","jsonc-parser":"^3.0.0","lodash":"^4.17.21","rimraf":"^3.0.2","test262-harness":"^7.5.2","type-fest":"^0.21.3","typescript":"^4.2.3","typescript-transform-export-interop":"^1.0.2"},"gitHead":"3c7c242b81f88a62110653c6a2d04752a68515ad","homepage":"https://github.com/fabiospampinato/jsonc-simple-parser#readme","_id":"jsonc-simple-parser@2.2.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-FPX8mfgttqVNrSVJNaL+IcvClJhRh/tiQeXA2/xDdnyuC388GxQHEArnHKJ9nC+Vn2ljfpVB4wOO8JEJGD6sxA==","shasum":"5830593afaface3138d285e95d38dccd2067e58f","tarball":"http://registry-npm.ywwl.com/jsonc-simple-parser/download/jsonc-simple-parser-2.2.0.tgz","fileCount":59,"unpackedSize":362418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdK9RCRA9TVsSAnZWagAArfQP/0MZ06Vi8A7q4qVdgYwL\nIsv/jlOb8sv3k1TTPHu+3LHfzqd4T/5+5g6opa894ML+4qCraYoSElwCq/Rd\n/KndOJjiJ/6waamM/6Es2fVRgzMUk1cFe0DYZyARk11Fr9qhkGLaO4QuRGLC\nhNd8TgACpNDfso+A0OKhkATK5q5RMMPss37PsxOmrVCuLbC5idDp71qhDZZ1\ngm+HiuHwd7jwnDNcDZnXsT2PCXim/qIHCMYs6ciujJ4cn/orrCp+c8y9Y0b6\nO3+f6UuynLGdoVzEagZY8YCeYON4iS4iON6riUMyb5aByN4woK+RYqqrg769\nPBKtiuqh/rz/peC0cmUi3V4ivq2VdvZrmNXYtV/Jx9fDiilxHSNnbMqmbCv2\nvfZZ/J6oKnAoyH9aUkEUZg7n9zL2xbA3djmjXe7LIjtvryo0ikD35s+bo0no\n9VVCXnEI6PBtagZ6Z2IGRRbGLpedgPiolkMEQgzkx2JRazuouQaPwtGXqyyv\nuNCv6NbVbRhPZ6GEvA9cNk4HiFQmP13F6t5db8Wn+AshvoCfNnBDpumeoAZ/\nfwFVUQ3RGCM9X2dVq+tkf2wNd1K7RFudy0I1A3paw1HJrUiHqPnLgZ514rfx\nvZB2Ky693wYY2ICVnryI6zSFmUvCHY6jGzHHy6peCFHoocZTBmDogXAX9Fey\nLmcn\r\n=d8GQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRxqVTVHFKQNVhx0ezwthIQf+ZP9t6KULd5laH+ar6DAiEAlUrH7OF+ADU13OImudw1RuQiw2pPPJRbZGbm068hYDs="}],"size":86231,"noattachment":false,"key":"/jsonc-simple-parser/-/jsonc-simple-parser-2.2.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsonc-simple-parser_2.2.0_1618259792778_0.3593541171065693"},"_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":1618259792908,"_cnpm_publish_time":1618259792908,"dist-tags":{"latest":"3.0.0"}}