{"_id":"jsonc","_rev":"14-6f118c2d93dac8d12bb055e33177be0c","name":"jsonc","dist-tags":{"latest":"3.0.0"},"versions":{"0.0.0":{"name":"jsonc","version":"0.0.0","keywords":["json","with","comments","jsonc","json","comments"],"author":{"name":"mayank"},"license":"BSD","_id":"jsonc@0.0.0","maintainers":[{"name":"mayank","email":"mayank1791989@gmail.com"}],"dist":{"shasum":"423f8724aefa21296e91c1e53238b0f1660b4838","tarball":"https://registry.npmjs.org/jsonc/-/jsonc-0.0.0.tgz","integrity":"sha512-rPektzX56+pn9Vsv3U0nIAKwWYyOxuGi3tXclkjAD4c63RIUub0kyd0cm0SpEdPmqWqb0oMTil527unFz7t/LQ==","signatures":[{"sig":"MEQCICzqYZ5BxoXHESqC1tT2OmDJNkJqVwR5oerS1z4xhpyMAiBgAbI8AApoVLE7dR33LpTs1ZmC17b+V1BCMWu+YpjexA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/jsonc.js","readme":"","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"description":"json + comments","directories":{}},"0.1.0":{"name":"jsonc","version":"0.1.0","keywords":["json","with","comments","jsonc","json","comments"],"author":{"name":"mayank"},"license":"BSD","_id":"jsonc@0.1.0","maintainers":[{"name":"mayank","email":"mayank1791989@gmail.com"}],"dist":{"shasum":"f8ebf9ba91c996995883edaa6ad1efb38b2f2b7c","tarball":"https://registry.npmjs.org/jsonc/-/jsonc-0.1.0.tgz","integrity":"sha512-9mIMxePbpJF2jLfqPIvdV7POb5tJ8uBEwFfBQQPEd86LGK5SBQTJfkMi0Uv0HhANiMpfhmjr/NyfyKWTIFdUPg==","signatures":[{"sig":"MEQCIHBTwnn3nf+u993yR2k1+n/PG0p1pxSjDyvjAi128iHsAiB2E3O2bZP8VI5d9i40+ZHjKfLP6fnNHQDmlQvQKhEqiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/jsonc.js","_from":"jsonc","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mayank","email":"mayank@finoit.com"},"_npmVersion":"1.1.59","description":"json + comments","directories":{}},"1.0.0":{"name":"jsonc","version":"1.0.0","keywords":["json","object","notation","safe","stringify","parse","read-file","write-file","comments","circular","cyclic","console","log","uglify","beautify","typescript"],"author":{"name":"Onur Yıldırım","email":"onur@cutepilot.com"},"license":"MIT","_id":"jsonc@1.0.0","maintainers":[{"name":"onury","email":"onur@cutepilot.com"}],"homepage":"https://github.com/onury/jsonc#readme","bugs":{"url":"https://github.com/onury/jsonc/issues"},"dist":{"shasum":"65ac65f0682c5f5f53f7b516f74278989f326fe2","tarball":"https://registry.npmjs.org/jsonc/-/jsonc-1.0.0.tgz","fileCount":10,"integrity":"sha512-G9mYq0AcGRtMCatgoGsT5ZUgfhlKLKKKmr2lSYvuYS46LrBSKuDM1R42c8BjjpsaVLQG0TFKdShaOs0HLN3d7g==","signatures":[{"sig":"MEYCIQDrYSpVjlTDGPrKZbmYrp/mY5+iqeGtl0eSFzbn6rFUhwIhAMEq8XuudWIrxaMU6hH2LsVnLOdaue1jlpx73bdIphZl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":88748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyLRlCRA9TVsSAnZWagAAppUP/RWgcrLP0+tzTovkhqa1\nzRMWyMMzdxpBMqkRVGWtKpKc3uzz+Ful/fU0nTOeTDw4siujxlwSbx3p0bsF\nHXxx59t5vetFdm9PO+6HJTMzTiHylD9O6kuXuKGDk8h+sAVjBH0zn8mh8KAz\nN6iKmLHobVTZkKHV1wBHf8bvaOZOHLVjVffbJJi17nziZBJfouVy26ZdAdaV\nqOJIEq3GjJVYvYdaDhjBL7ED6hQ71dcEDL5mjftzLUQFR4sqTdgifN9Bv/Cf\nlpHjidZTSRwiTUQnPyTihhFizvl4D4zW1l6Xup090JZWOo6GWaXJ0ePdq6Sd\nVtzg8eElUQfOowvX5FTl7+gdIppqevZDAO7Y8IA2McBGPBnu9iv1tjR9qRGx\nEe/ymITY7UxjGD3ezbJSPObmLZGV8A1QH/qvkcfLRMwfhqNUAX4pqAavxhJv\n6R4zmKN38fnApWvzl5LAuUn23yFMUWwhYipI2t3V5S6pv17QujouM5Cv+qEX\nRtuR0G5+V+syr44yZ3UxGXri1FA4lwH66M86g4nN9qpxJN7LRv2F2LWwPFyj\nxPh3Ku8cQe/KUEdq8hbA5ZnAFF8Y/RBEZ33KZ2ECiVQLn4niSQfpu9hpUs3D\no/k7TbV8l23KODPw7EZnTDP6l3W6LX7UF3hPLthTgIMqUyuCBLd3FPVUc53A\nF1mi\r\n=iiUo\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["<rootDir>/src","<rootDir>/lib","<rootDir>/test"],"globals":{"ts-jest":{"diagnostics":false}},"testRegex":"(/test/.*|(\\.|/)(test|spec))\\.tsx?$","transform":{"^.+\\.tsx?$":"ts-jest"},"testEnvironment":"node","coverageDirectory":"./test/coverage","collectCoverageFrom":["src/**/*.ts","!src/interfaces.ts"],"moduleFileExtensions":["ts","tsx","js","json"],"testPathIgnorePatterns":["/backup/","/helpers/","/coverage/"]},"main":"index.js","types":"./lib/jsonc.d.ts","gitHead":"200fd4536f2ecb58f673854ccc743a7794d9445d","scripts":{"docs":"docma -c ./docma.config.json","test":"jest --verbose --no-cache","build":"npm run clean && npm run cover && mkdirp ./lib && tsc","clean":"rimraf ./lib","cover":"jest --coverage --verbose --no-cache","report":"open ./test/coverage/lcov-report/index.html","coveralls":"cat ./test/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -v"},"_npmUser":{"name":"onury","email":"onur@cutepilot.com"},"repository":{"url":"git+https://github.com/onury/jsonc.git","type":"git"},"_npmVersion":"6.4.1","description":"Everything you need in JSON land. Parse JSON with comments, stringify objects with circular references, etc...","directories":{},"_nodeVersion":"8.9.3","dependencies":{"mkdirp":"^0.5.1","strip-bom":"^3.0.0","parse-json":"^4.0.0","graceful-fs":"^4.1.11","fast-safe-stringify":"^2.0.6","strip-json-comments":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","docma":"^2.1.0","rimraf":"^2.6.2","ts-jest":"^23.10.4","jest-cli":"^23.6.0","coveralls":"^3.0.2","typescript":"^3.1.3","@types/jest":"^23.3.5","@types/node":"^10.12.0","@types/mkdirp":"^0.5.2","@types/strip-bom":"^3.0.0","@types/parse-json":"^4.0.0","@types/strip-json-comments":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/jsonc_1.0.0_1539880037053_0.24196255013939094","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"jsonc","version":"1.1.0","keywords":["json","object","notation","safe","stringify","parse","read-file","write-file","comments","circular","cyclic","console","log","uglify","beautify","typescript"],"author":{"name":"Onur Yıldırım","email":"onur@cutepilot.com"},"license":"MIT","_id":"jsonc@1.1.0","maintainers":[{"name":"onury","email":"onur@cutepilot.com"}],"homepage":"https://onury.io/jsonc","bugs":{"url":"https://github.com/onury/jsonc/issues"},"dist":{"shasum":"e449605cfe88fc9caea7978d1ee9854975484f3b","tarball":"https://registry.npmjs.org/jsonc/-/jsonc-1.1.0.tgz","fileCount":12,"integrity":"sha512-FIX6wN79VBnhR22j56INtsL8ti3R9nKTIx0il/eNehR8WWOUebTLFcXa/7CJKJ0NjtZCyVpT3poU9imdJc5cnA==","signatures":[{"sig":"MEQCIDvpGgqmytOTk7UWD6qOJn6E1BgUUrQcr3rqMerkrlC1AiB34dPxRdTaEs6qiIxKbGz8bJ1uefNl9mgkW5+vVLRHww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9pi+CRA9TVsSAnZWagAAjZEP/0V0R3NdLV5dLqTv5o0s\nSq2UtYBepDYQxGHjhyXGgx+dYB6zSeYw1D25Ls7ftchTLHehX7XmHZ6Cgnmw\n1lMcocO+VeVBfHKDW8tHg1O5a+y4A1BM5lFnk0qfaS86hVPqJ6H3bnZs85xI\nlymfrHcfxs8Pg27hkj+gZL98qIxZ0JS5e0ShnSETyPsoTOUQrG+0DiPK21C4\nWnXqa88+97w1ne/1S5PaO1/0wEd3+VnkmTGlkvMDErECl7zqUxwZmyXM/J5g\nUyd7P9w8XWtrkuT0eDswLQrIsu2o6JzGSSWdHi51T5ijluQpE94MSKe7so6A\n3CIyFUhte0bs82RCUoL1DrNQPJUa9WQogwefDIb6MvW+qtwC+ejIfPdVfpgq\nP2S5U1IRAfnlQcQ9TnRDN+CJaf8Tvve1aNTFP2+hOFLJK2AJSIRqlEcxyXVX\npKS8w7JuMM94hMIJEgv8sIGRZk7SmCZ1yQetJCGkPtipnQzT8E5EZHWExpmc\nSfU84ls0zl28HNAnl/Kqyr+9ff1fFjL83KoFd3yR79zOz9VG5vyFNeUwfApV\n1lbogslnWytUc5KfblVMOoCx9CrcaoBy7mEM+ecXnWxRTv749cqACUKUeoH8\n2G6v7b0Y8d4TNzHiVChFAP5wlcJvsc7WyaTSBuzk70H2I/EkIIteUe96iDK5\nrx82\r\n=lVHU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["<rootDir>/src","<rootDir>/lib","<rootDir>/test"],"globals":{"ts-jest":{"diagnostics":false}},"testRegex":"(/test/.*|(\\.|/)(test|spec))\\.tsx?$","transform":{"^.+\\.tsx?$":"ts-jest"},"testEnvironment":"node","coverageDirectory":"./test/coverage","collectCoverageFrom":["src/**/*.ts","!src/interfaces.ts"],"moduleFileExtensions":["ts","tsx","js","json"],"testPathIgnorePatterns":["/backup/","/helpers/","/coverage/"]},"main":"index.js","types":"./lib/jsonc.d.ts","gitHead":"8b94269637edf124039e5986b8d6d71f9dc2468c","scripts":{"docs":"docma -c ./docma.json","test":"jest --verbose --no-cache","build":"npm run clean && npm run cover && mkdirp ./lib && tsc","clean":"rimraf ./lib","cover":"jest --coverage --verbose --no-cache","report":"open ./test/coverage/lcov-report/index.html","coveralls":"cat ./test/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -v"},"_npmUser":{"name":"onury","email":"onur@cutepilot.com"},"repository":{"url":"git+https://github.com/onury/jsonc.git","type":"git"},"_npmVersion":"6.4.1","description":"Everything you need in JSON land. Parse JSON with comments, stringify objects with circular references, etc...","directories":{},"_nodeVersion":"8.12.0","dependencies":{"mkdirp":"^0.5.1","strip-bom":"^3.0.0","parse-json":"^4.0.0","graceful-fs":"^4.1.15","fast-safe-stringify":"^2.0.6","strip-json-comments":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","docma":"^3.0.0","rimraf":"^2.6.2","ts-jest":"^23.10.4","jest-cli":"^23.6.0","coveralls":"^3.0.2","typescript":"^3.1.6","@types/jest":"^23.3.9","@types/node":"^10.12.10","@types/mkdirp":"^0.5.2","@types/strip-bom":"^3.0.0","@types/parse-json":"^4.0.0","@types/strip-json-comments":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/jsonc_1.1.0_1542887614041_0.8953226842192865","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"jsonc","version":"2.0.0","keywords":["json","object","notation","safe","stringify","parse","read-file","write-file","comments","circular","cyclic","console","log","uglify","beautify","typescript"],"author":{"name":"Onur Yıldırım","email":"onur@cutepilot.com"},"license":"MIT","_id":"jsonc@2.0.0","maintainers":[{"name":"onury","email":"onur@cutepilot.com"}],"homepage":"https://onury.io/jsonc","bugs":{"url":"https://github.com/onury/jsonc/issues"},"dist":{"shasum":"9e2a25100d164a9bb864c57517563717fa882551","tarball":"https://registry.npmjs.org/jsonc/-/jsonc-2.0.0.tgz","fileCount":12,"integrity":"sha512-B281bLCT2TRMQa+AQUQY5AGcqSOXBOKaYGP4wDzoA/+QswUfN8sODektbPEs9Baq7LGKun5jQbNFpzwGuVYKhw==","signatures":[{"sig":"MEYCIQDSS3bVifxpD9Cix5fMtsitDpQWN3vROBtcQXVbKI5HHgIhALETCCNzc4bANTkesnuTzMQVUPjQuHazZgnMERT09I/c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBu4DCRA9TVsSAnZWagAAIeUQAJXGuMwrlpfFJw0jUWSk\noPbjXHL3IgWCEt9z6k2HtXNkWJRRNpO0mehwxxgOW9RVYRWvQ94M2NQkNzYo\n+8zeCgOUJskb+dYch1Pu7iIqorbw5MGQr1B6CQfF1mlVhQybUs1i08m4Nu+e\nAcshUDjPKa38pIWUUyl3nnpsPkEHqrsTgdKGROa1FmtD3hZ7HrLbfGW1113H\nvg1YoFblW4RKkbESTMNz5PU/6Q4prW0uAQwnW0QLO8JC/y/i4ZN9LLEkpQhg\nGwj91T9/a7kwpGgSqHiVw6so3kuj3HvVNoyK6khqu3htQ1y4Wy6n+GWE7co5\nQq1/VPgqWnfr3FYUuiPO9hAyZq8RqlOb397WYYtOlsj3c9tYrDkOo/SF0Tgc\nqqvJOa+1nLeLxA9cO+58Gu51Kcti+E7YNbUUdUKOV4/Pybkk5e2AuC0CV/XB\nA6qr9st7T4gTpxXV5RTf9a5tODBQ9gJzgyaI56cnN29GJPgjgSgLvXRB6rSq\n7u/T+af8L9csxSE1L7XVTx8Dz4Cw7uTv8+bWyGTtMLoX2ht1vy94NPuOx0p4\nimkgD54QQI7XCYBrtqhF9Avnkp+WXC1kGBjL2SZoq+GY4VM7qOke0/Okohq9\nifsWkHpxU3JAJjY1wU2Nm6RvQB2+YKMCfJ0aGWv97arHDnvoafDCqSS/tj/u\nDSFf\r\n=vtcO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["<rootDir>/src","<rootDir>/lib","<rootDir>/test"],"globals":{"ts-jest":{"diagnostics":false}},"testRegex":"(/test/.*|(\\.|/)(test|spec))\\.tsx?$","transform":{"^.+\\.tsx?$":"ts-jest"},"testEnvironment":"node","coverageDirectory":"./test/coverage","collectCoverageFrom":["src/**/*.ts","!src/interfaces.ts"],"moduleFileExtensions":["ts","tsx","js","json"],"testPathIgnorePatterns":["/backup/","/helpers/","/coverage/"]},"main":"index.js","types":"./lib/jsonc.d.ts","engines":{"node":">=8"},"gitHead":"e72b205dbbc145635bd13cef29b253d453610e98","scripts":{"docs":"docma -c ./docma.json","test":"jest --verbose --no-cache","build":"npm run clean && npm run cover && mkdirp ./lib && tsc","clean":"rimraf ./lib","cover":"jest --coverage --verbose --no-cache","report":"open ./test/coverage/lcov-report/index.html","coveralls":"cat ./test/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -v"},"_npmUser":{"name":"onury","email":"onur@cutepilot.com"},"repository":{"url":"git+https://github.com/onury/jsonc.git","type":"git"},"_npmVersion":"6.9.0","description":"Everything you need in JSON land. Parse JSON with comments, stringify objects with circular references, etc...","directories":{},"_nodeVersion":"10.15.1","dependencies":{"mkdirp":"^0.5.1","strip-bom":"^4.0.0","parse-json":"^4.0.0","graceful-fs":"^4.1.15","fast-safe-stringify":"^2.0.6","strip-json-comments":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.8.0","docma":"^3.2.2","rimraf":"^2.6.3","ts-jest":"^24.0.2","jest-cli":"^24.8.0","coveralls":"^3.0.4","typescript":"^3.5.2","@types/jest":"^24.0.15","@types/node":"^12.0.8","@types/mkdirp":"^0.5.2","@types/strip-bom":"^4.0.1","@types/parse-json":"^4.0.0","@types/strip-json-comments":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/jsonc_2.0.0_1560735234752_0.6878964936217269","host":"s3://npm-registry-packages"}},"3.0.0":{"_id":"jsonc@3.0.0","bugs":{"url":"https://github.com/onury/jsonc/issues"},"dist":{"shasum":"d731f9b4a63c6d95300dedc0682d18393a254f0c","tarball":"https://registry.npmjs.org/jsonc/-/jsonc-3.0.0.tgz","fileCount":23,"integrity":"sha512-hfb1qUb/sxI0jU6cAw5nxyGDbbuWv4ay2yYziRlkkagiRXAJeiRpw/LyNoGergmizqi7m604IoAF7Hi6jV/Jwg==","signatures":[{"sig":"MEUCIELSE/OA9hb0iEDEr1uCUfwaYK7xSOJMILWnLAY2Xpz5AiEAvDTpH1uuZkLnG8kgAiciehSA/V3/YY1tmOHUhjLiXbU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCFl834dM7pLPvDVh/AMcIuGljq2Jw17iEKVx9G9SVOFAIgLZG68Eu0wtKzirN3AAfBot65lgubJ1vZJZjEtjPYOB8="}],"unpackedSize":72815},"main":"./lib/index.js","name":"jsonc","type":"module","types":"./lib/index.d.ts","author":{"name":"Onur Yıldırım","email":"onur@cutepilot.com"},"module":"./lib/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js","default":"./lib/index.js"},"./package.json":"./package.json"},"gitHead":"02eb679a501ead29166ba42817de499c5c8b0a62","license":"MIT","scripts":{"lint":"biome check src test","test":"vitest run","build":"tsc -p tsconfig.build.json","cover":"vitest run --coverage","format":"biome check --write src test","pretest":"npm run lint && npm run typecheck","mutation":"stryker run","typecheck":"tsc --noEmit -p tsconfig.json","prepublishOnly":"npm run build"},"version":"3.0.0","_npmUser":{"name":"onury","email":"onur@cutepilot.com"},"homepage":"https://github.com/onury/jsonc#readme","keywords":["json","jsonc","comments","parse","stringify","circular","cyclic","safe","read-file","write-file","strip-comments","bom","log","uglify","beautify","minify","typescript","esm"],"overrides":{"qs":"^6.16.0"},"repository":{"url":"git+https://github.com/onury/jsonc.git","type":"git"},"_npmVersion":"11.16.0","description":"Everything you need in JSON land. Parse JSON with comments, stringify objects with circular references, etc...","directories":{},"maintainers":[{"name":"onury","email":"onur@cutepilot.com"}],"sideEffects":false,"_nodeVersion":"24.18.1","dependencies":{"parse-json":"^8.3.0","fast-safe-stringify":"^2.1.1","strip-json-comments":"^5.0.3"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11","typescript":"^6.0.3","@types/node":"^26.6.2","tsconfig-oy":"^2.0.1","@biomejs/biome":"^2.5.14","biome-config-oy":"^1.1.0","@stryker-mutator/core":"^10.0.0","@vitest/coverage-istanbul":"^4.1.11","@stryker-mutator/vitest-runner":"^10.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jsonc_3.0.0_1790206979420_0.46992245870184424"}}},"time":{"created":"2012-08-24T07:37:56.902Z","modified":"2026-09-23T23:42:59.856Z","0.0.0":"2012-08-24T07:38:03.073Z","0.1.0":"2013-01-23T11:38:50.982Z","1.0.0":"2018-10-18T16:27:17.124Z","1.1.0":"2018-11-22T11:53:34.210Z","2.0.0":"2019-06-17T01:33:54.836Z","3.0.0":"2026-09-23T23:42:59.706Z"},"bugs":{"url":"https://github.com/onury/jsonc/issues"},"author":{"name":"Onur Yıldırım","email":"onur@cutepilot.com"},"license":"MIT","homepage":"https://github.com/onury/jsonc#readme","keywords":["json","jsonc","comments","parse","stringify","circular","cyclic","safe","read-file","write-file","strip-comments","bom","log","uglify","beautify","minify","typescript","esm"],"repository":{"url":"git+https://github.com/onury/jsonc.git","type":"git"},"description":"Everything you need in JSON land. Parse JSON with comments, stringify objects with circular references, etc...","maintainers":[{"name":"onury","email":"onur@cutepilot.com"}],"readme":"# jsonc\n\n<p align=\"center\">\n  <a href=\"https://github.com/onury/jsonc/actions/workflows/ci.yml\"><img src=\"https://github.com/onury/jsonc/actions/workflows/ci.yml/badge.svg\" alt=\"build\" /></a>\n  <a href=\"#tests--quality\"><img src=\"https://img.shields.io/badge/coverage-100%25-2BB150?logo=vitest&logoColor=%23FDC72B&style=flat\" alt=\"coverage\" /></a>\n  <a href=\"https://stryker-mutator.io/docs/\"><img src=\"https://img.shields.io/badge/mutation-100%25-2BB150?style=flat\" alt=\"mutation score\" /></a>\n  <a href=\"https://www.npmjs.com/package/jsonc\"><img src=\"https://img.shields.io/npm/v/jsonc.svg?style=flat&label=&color=%23C6234B&logo=npm\" alt=\"version\" /></a>\n  <a href=\"https://www.npmjs.com/package/jsonc\"><img src=\"https://img.shields.io/npm/dm/jsonc.svg?style=flat&color=2BB150&label=downloads\" alt=\"downloads\" /></a>\n  <a href=\"https://gist.github.com/onury/d3f3d765d7db2e8b2d050d14315f2ac7\"><img src=\"https://img.shields.io/badge/ESM-F7DF1E?style=flat\" alt=\"ESM\" /></a>\n  <a href=\"https://www.typescriptlang.org/\"><img src=\"https://img.shields.io/badge/TS-3260C7?style=flat\" alt=\"TS\" /></a>\n  <a href=\"https://github.com/onury/jsonc/blob/master/LICENSE\"><img src=\"https://img.shields.io/npm/l/jsonc.svg?style=flat&color=blue\" alt=\"license\" /></a>\n</p>\n\n> This module is **ESM** 🔆. Please [**read this**](https://gist.github.com/onury/d3f3d765d7db2e8b2d050d14315f2ac7).\n\nEverything you need in JSON land. Parse JSON with comments, stringify objects with circular references, read and write JSON files; and do all of it safely, without try/catch blocks if you like.\n\n```sh\nnpm i jsonc\n```\n\n## Features\n\n- Parse JSON with **comments** (and optionally, **trailing commas**).\n- Stringify objects with **circular** references.\n- **Safely** parse / stringify without try/catch blocks.\n- **Read** and auto-parse JSON files, sync or async (with promises).\n- Auto-stringify and **write** JSON files, sync or async; creates missing directories.\n- Strips the UTF-8 **BOM**.\n- **Log** objects as JSON, without worrying about errors.\n- **Uglify** / **beautify** JSON strings.\n- More helpful JSON **errors** (via [parse-json][parse-json]).\n- **Typed**. Written in TypeScript.\n\n## Usage\n\n```ts\nimport { jsonc } from 'jsonc';\n// or the default export\nimport jsonc from 'jsonc';\n\n// CommonJS (Node.js 22.12 or newer)\nconst jsonc = require('jsonc');\n```\n\nThis is safe for JSON with comments:\n\n```ts\njsonc.parse('// comment\\n{\"data\": /* comment */ \"value\"}\\n'); // —> { data: 'value' }\n```\n\nAnd this is safe for circular references:\n\n```ts\nconst obj = { x: 1 };\nobj.y = obj; // circular\njsonc.stringify(obj); // —> '{\"x\":1,\"y\":\"[Circular]\"}'\n```\n\nBut this is seriously safe:\n\n```ts\n// safe version of every method\nimport { safe as jsonc } from 'jsonc';\n\nconst [err, result] = jsonc.parse('[invalid JSON}');\nif (err) {\n  console.log(`Failed to parse JSON: ${err.message}`);\n} else {\n  console.log(result);\n}\n```\n\n> [!NOTE]\n> Since v3 this package is ESM-only. CommonJS code can still `require()` it on Node.js 22.12 or newer (Node's `require(esm)`), and it returns `jsonc` itself as v2 did; so `const jsonc = require('jsonc')` and `const { jsonc, safe } = require('jsonc')` both work. On Node.js 22.0 – 22.11, use `import` or `await import('jsonc')`.\n\n### Parse & Stringify\n\n`parse()` strips comments before parsing. It takes the native reviver function, or an options object. Comments are replaced with whitespace, so the position in a parse error points into your original string.\n\n```ts\njsonc.parse('{\"a\":1} // one', (key, value) => (key === 'a' ? 2 : value)); // —> { a: 2 }\njsonc.parse(str, { stripComments: false }); // throws if str has comments\n\n// trailing commas are opt-in (as in tsconfig.json)\njsonc.parse('{ \"a\": [1, 2,], }', { allowTrailingCommas: true }); // —> { a: [1, 2] }\n\n// typed result (not validated at runtime)\nconst config = jsonc.parse<IConfig>(str);\n```\n\n`stringify()` supports both the native `JSON.stringify()` signature and an options object. Circular references are replaced with `\"[Circular]\"` unless you turn it off with `handleCircular: false`; in which case it throws like the native method. Anything else the native method throws for (a `BigInt`, a throwing `toJSON()`, etc…) is thrown as well.\n\n```ts\njsonc.stringify(obj, null, 2);\njsonc.stringify(obj, { replacer: ['a', 'b'], space: 2 });\njsonc.stringify(obj, { handleCircular: false }); // throws if obj has circular references\n```\n\n### Validate, Strip, Uglify & Beautify\n\n```ts\njsonc.isJSON('{\"x\":1}');                 // —> true\njsonc.isJSON('true');                    // —> false (valid JSON but no object or array structure)\njsonc.isJSON('// c\\n{\"x\":1}', true);     // —> true (allow comments)\n\njsonc.stripComments('// c\\n{\"x\":1}');    // —> '\\n{\"x\":1}'\njsonc.uglify('{\\n  // c\\n  \"x\": 1\\n}');  // —> '{\"x\":1}'\njsonc.beautify('{\"x\":1}');               // —> '{\\n  \"x\": 1\\n}'\njsonc.normalize(new SomeClass());        // —> plain object\n```\n\n### Read & Write Files\n\n`read()` strips the UTF-8 BOM and comments, then parses; it takes the same `allowTrailingCommas` option. `write()` stringifies the same way `stringify()` does (circular references included, unless `handleCircular` is `false`), adds a trailing newline and creates missing parent directories (unless `autoPath` is `false`).\n\n```ts\nconst config = await jsonc.read<IConfig>('path/to/config.json');\nawait jsonc.write('path/to/out.json', config, { space: 2 });\n\n// sync versions\nconst data = jsonc.readSync('path/to/config.json');\njsonc.writeSync('path/to/out.json', data);\n```\n\nWith the safe versions, the returned promise never rejects:\n\n```ts\nimport { safe as jsonc } from 'jsonc';\n\nconst [err, config] = await jsonc.read('path/to/config.json');\nif (err) console.log('Failed to read JSON file');\n```\n\n### Logging\n\n`log()` and `logp()` (pretty) stringify their arguments without throwing and write them to `process.stdout`. An `Error` is logged with its stack, to `process.stderr`. Use `config()` to redirect either stream.\n\n```ts\njsonc.log({ a: 1 }, [1, 2]); // {\"a\":1} [1,2]\njsonc.logp({ a: 1 });\n// {\n//   \"a\": 1\n// }\n\njsonc.config({ streamErr: fs.createWriteStream('errors.log') });\njsonc.log(new Error('this is logged to the file'));\n```\n\n## API\n\nAll methods are static; `jsonc.safe` (also the named `safe` export) holds the safe versions.\n\n| Method | Returns | Safe version returns | Description |\n| ------ | ------- | -------------------- | ----------- |\n| `parse<T>(str, options?)` | `T` (default `any`) | `[err, T]` | Parses a JSON string; comments are stripped. `options` is a reviver function or [parse options](#options). |\n| `stringify(value, options?)`<br/>`stringify(value, replacer?, space?)` | `string` | `[err, string]` | Stringifies a value. `options` are the [stringify options](#options). Throws for circular references only if `handleCircular` is `false`, and for anything the native method throws for (e.g. a `BigInt`). |\n| `isJSON(str, allowComments?)` | `boolean` | `boolean` | Whether the string is JSON with an object or array structure. `allowComments` defaults to `false`. |\n| `stripComments(str, whitespace?)` | `string` | `[err, string]` | Strips comments; or replaces them with whitespace when `whitespace` is `true`. |\n| `uglify(str)` | `string` | `[err, string]` | Removes comments and whitespace from a JSON string. |\n| `beautify(str, space?)` | `string` | `[err, string]` | Removes comments and indents a JSON string. `space` defaults to `2`. |\n| `normalize<T>(value, replacer?)` | `T` (default `any`) | `[err, T]` | Stringifies and parses back a value, to plain JSON data. |\n| `read<T>(filePath, options?)` | `Promise<T>` | `Promise<[err, T]>` | Reads and parses a JSON file; strips the UTF-8 BOM. `options` are the [parse options](#options). |\n| `readSync<T>(filePath, options?)` | `T` | `[err, T]` | Sync version of `read()`. |\n| `write(filePath, data, options?)` | `Promise<true>` | `Promise<[err, true]>` | Stringifies and writes a JSON file, with a trailing newline. `options` are the [write options](#options). |\n| `writeSync(filePath, data, options?)` | `true` | `[err, true]` | Sync version of `write()`. |\n| `log(...args)` | `void` | `void` | Logs the arguments as JSON. |\n| `logp(...args)` | `void` | `void` | Logs the arguments as indented JSON. |\n| `config(cfg?)` | `void` | `void` | Sets `{ stream?, streamErr? }` for the loggers. Omitted streams reset to `process.stdout` / `process.stderr`. |\n\n### Options\n\n| Option | Type | Default | Used by | Description |\n| ------ | ---- | ------- | ------- | ----------- |\n| `reviver` | `Reviver` | — | parse, read, readSync | Transforms the parsed results, as with `JSON.parse()`. |\n| `stripComments` | `boolean` | `true` | parse, read, readSync | Whether to strip comments. If `false`, comments are a parse error. |\n| `allowTrailingCommas` | `boolean` | `false` | parse, read, readSync | Whether to allow trailing commas in objects and arrays. Takes effect only when comments are stripped. |\n| `replacer` | `Replacer` | — | stringify, write, writeSync | A replacer function, or an allow-list array of property names. |\n| `space` | `string \\| number` | — | stringify, write, writeSync | Indentation; a number of spaces or an indent string. |\n| `handleCircular` | `boolean` | `true` | stringify, write, writeSync | Whether to replace circular references with `\"[Circular]\"`. If `false`, they throw. |\n| `mode` | `number` | `0o666` | write, writeSync | File-system permission mode for a new file. |\n| `autoPath` | `boolean` | `true` | write, writeSync | Whether to create missing parent directories. |\n\nExported types: `IParseOptions`, `IStringifyOptions`, `IReadOptions`, `IWriteOptions`, `IConfig`, `Replacer`, `Reviver`, `SafeResult<T>`.\n\n## Tests & Quality\n\n100% test coverage (statements, branches, functions, lines) and a **100% [Stryker](https://stryker-mutator.io) mutation score**, run across Node.js 22, 24 and 26 in CI.\n\n## Changelog\n\nSee [**CHANGELOG.md**][changelog]. **v3 is ESM-only** and requires Node.js 22 or newer; it also changes a few behaviors (circular references in `write()`, `BigInt` in `stringify()`, parse error positions). The migration notes live there.\n\n## Related Projects\n\n- [**notation**](https://github.com/onury/notation) — Read, modify, and filter the contents of objects and arrays via dot/bracket notation strings or glob patterns.\n\n## License\n\n© 2026, Onur Yıldırım. [**MIT**][license] License.\n\n[license]:https://github.com/onury/jsonc/blob/master/LICENSE\n[changelog]:https://github.com/onury/jsonc/blob/master/CHANGELOG.md\n[parse-json]:https://github.com/sindresorhus/parse-json\n","readmeFilename":"README.md"}