{"name":"jsonc-simple-parser","description":"A simple JSON parser that supports comments and optional trailing commas.","version":"1.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","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":"314fea66f59563b40abb5fc20595c09a1ef524aa","homepage":"https://github.com/fabiospampinato/jsonc-simple-parser#readme","_id":"jsonc-simple-parser@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"integrity":"sha512-g4Pz2M0g6pUfQTgxQ5Zu4QemnsXGm+KNBe+AzfdIRPuyrF+4a5mKbVRd9u8fSOMx1SPAbrNacisJ33HvCgCbKg==","shasum":"bc4e41b0131851f89be5ec396ec60d7e94b64256","tarball":"http://registry-npm.ywwl.com/jsonc-simple-parser/download/jsonc-simple-parser-1.0.0.tgz","fileCount":18,"unpackedSize":202067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRjuSCRA9TVsSAnZWagAAg6IP/1iDDi84W3URe2j4d8b4\n8O4KYFSaLoZHXzfHLCuOBVnMF4A4uptp65VqhFSBNeh0sq/oHej1hoEAcB6i\nrpn6R7gMj7MkRwFhwIXnJrEpi1gGlZMI6ZSTRCkqANyxvIsTAZm85lMZBszz\nkacIbZYnJq24Znn5rdJECd7Mmu6IjJzy1GdvyPPV4T2+soHbvGJGlgt3pzQL\nMIJe/mTZPbzGoFMRYmMADrKPFhvmDhNvbV7mu73zq1hBm/fEouEGjqItgr0X\nejt5RzPdzTrDv6dnw5nbLYVRr04rIgxjNLp80/DQfRWzeZhid8iXywtbH4X2\n5I2UmHVqZyXmNaaubM5nnit0TrQtkEcF1iu+m9bZ159urr2ccry8SCeerqoH\nykjFAXkPR1LfNjmH672fwGp2kxPCyRKjqCOxSRTJCemAMOT56FgMakuLzvTi\nMsZgOu5Haptql5fJdhEcGdxhuw5e7NVWcyWohyfy/ZwbvmXmermUp/56q++1\nPeQf2YUHhl2DpLJPzn0LMy5ClYaknQC8BufuxXzhSThMhO/WUYTED5rbandG\nsv4R4dHr6FZMfsVjI+bTkmUtQb8r66l/h5fRvBToeT+gyjCnEzQlElWqpbFB\nSa65N4L4jCwNRKoEPW0p2oJDNOgcN0MgIqIZZR4p7A5hwGEq3Gep65vO1C/l\nj+dd\r\n=dD/3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuZZt4/X2NzZTPQbQmuiQZP3RdWwGdgB6WD2biXPz1zAIhAKPekTfLP/9iAf6YJ88Rzxq5tlJ6GYbCLQd+TmBFclok"}],"size":51906,"noattachment":false,"key":"/jsonc-simple-parser/-/jsonc-simple-parser-1.0.0.tgz"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsonc-simple-parser_1.0.0_1615215506115_0.5339150208983767"},"_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":1615215506270,"_cnpm_publish_time":1615215506270,"dist-tags":{"latest":"3.0.0"}}