{"name":"jsonc-simple-parser","description":"A simple JSON parser that supports comments and optional trailing commas.","version":"2.0.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","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":"1ab00400e25de48983bff039a568d4601923fc0a","homepage":"https://github.com/fabiospampinato/jsonc-simple-parser#readme","_id":"jsonc-simple-parser@2.0.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-h5iWKWP9iQLtHuNHPZ24csZzTqx9eyWdSRFB7gVveKTih6WPAJUgrMBpsQE//D0NV96Fmh2oaoQEBdNdY0H8GQ==","shasum":"75499075f3a2eff5919fca80f35e1e00b25ff85d","tarball":"http://registry-npm.ywwl.com/jsonc-simple-parser/download/jsonc-simple-parser-2.0.0.tgz","fileCount":55,"unpackedSize":266151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU9O4CRA9TVsSAnZWagAAtG4QAJR8NefRTB6qA4UwAdqF\nJegI3SBR+lCc0udVMWTwPu241cv9bMalQgFxMAgoLaxwXPicHSGvDQ9oQRV/\nr1GjexsBUr7QwwZGigbSF2v9DhnHaP0gJw/ytLunWaOAUXStouxrJ4zY9l6Z\nJeHl9NI1FRo8G1ilC7/jqdkmj6dRUhkWuAuNXNn6f5B/jBnQ/RTOmGPHvWs0\nRck4YegnvmHyKDk9J4hiQPC7Q5pl+/L8st9Xefo6ftuPe2Lg3Abp1u1pAMHB\nHumznUZasqgOMcZPpRdexE99z7V1diEAgfXIMJfXYHcubkqytAYrPA/D9U9y\ntnKturzUZ9Zoa7D5D8Ky+ZEYd8iCSs1BmkCNCyEvOCxuG6k9tmx52NA9QFtT\nGanlFORiycVydBWqrijJT6G18B/xMaUJcEBpeHCjweXQYT5dED59Dbn1P/jg\nEeI0WLNhoDD0amGRNFZL6HtEXcImuG19q7lvXWx1rQSS6TmSSGjEH0R7J6Fk\n8TesLofq23xCXcFGj9lwaNaVwZfylXkFMhTklsXTLlWn3WfGJyWD1IQx8XFY\nlRKj5f4JY0GOfJEVE2fyGIbfiMK4bdLfwXHweEVHfDHptG3dct7tQXUkAgae\n85DI27YIF7XXKHUGQdhWYEJGhmEWypmwgXWInKa8hQzJ8AJSG5PjsxgNZ0Hu\nBB89\r\n=EhHK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDkOHyjKcKWmwD6UQJi5O3nWnN33ERu3BWrQV2ltl7YgIgNk0iD7EY/SAS8J2cx2ogocP//SLvnD0+C0YXWiPMnQA="}],"size":63411,"noattachment":false,"key":"/jsonc-simple-parser/-/jsonc-simple-parser-2.0.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.0.0_1616106423455_0.9594273429157403"},"_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":1616106423666,"_cnpm_publish_time":1616106423666,"dist-tags":{"latest":"3.0.0"}}