{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["parse","json","graceful","error","message","humanize","friendly","helpful","string","str"],"dist-tags":{"latest":"2.2.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Parse JSON with more helpful errors","readme":"# parse-json [![Build Status](https://travis-ci.org/sindresorhus/parse-json.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-json)\n\n> Parse JSON with more helpful errors\n\n\n## Install\n\n```\n$ npm install --save parse-json\n```\n\n\n## Usage\n\n```js\nvar parseJson = require('parse-json');\nvar json = '{\\n\\t\"foo\": true,\\n}';\n\n\nJSON.parse(json);\n/*\nundefined:3\n}\n^\nSyntaxError: Unexpected token }\n*/\n\n\nparseJson(json);\n/*\nJSONError: Trailing comma in object at 3:1\n}\n^\n*/\n\n\nparseJson(json, 'foo.json');\n/*\nJSONError: Trailing comma in object at 3:1 in foo.json\n}\n^\n*/\n\n\n// you can also add the filename at a later point\ntry {\n\tparseJson(json);\n} catch (err) {\n\terr.fileName = 'foo.json';\n\tthrow err;\n}\n/*\nJSONError: Trailing comma in object at 3:1 in foo.json\n}\n^\n*/\n```\n\n## API\n\n### parseJson(input, [reviver], [filename])\n\n#### input\n\nType: `string`\n\n#### reviver\n\nType: `function`\n\nPrescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter\n) for more.\n\n#### filename\n\nType: `string`\n\nFilename displayed in the error message.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n","repository":{"type":"git","url":"https://github.com/sindresorhus/parse-json"},"users":{"nexdrew":true,"huhgawz":true,"mightyjongyo":true,"rocket0191":true,"drveresh":true,"kakaman":true},"bugs":{"url":"https://github.com/sindresorhus/parse-json/issues"},"license":"MIT","versions":{"1.0.0":{"name":"parse-json","description":"The missing JSON.parse async interface.","homepage":"https://github.com/Kikobeats/parse-json","version":"1.0.0","main":"./index.js","author":{"name":"Kiko Beats","email":"josefrancisco.verdu@gmail.com","url":"https://github.com/Kikobeats"},"repository":{"type":"git","url":"https://github.com/Kikobeats/parse-json"},"bugs":{"url":"https://github.com/Kikobeats/parse-json/issues"},"keywords":["JSON","parse","async","promise"],"dependencies":{"cb2promise":"~1.0.0","ensure-async":"~1.0.0","errorifier":"~0.1.3"},"devDependencies":{"browserify":"*","coffee-script":"*","coffeeify":"*","gulp":"*","gulp-header":"*","gulp-uglify":"*","gulp-util":"*","mocha":"*","should":"*","vinyl-buffer":"*","vinyl-source-stream":"*"},"engines":{"node":">= 0.10.0","npm":">= 1.4.0"},"scripts":{"test":"sh test/test.sh"},"license":"MIT","gitHead":"2e224300571311c6b9dc8cb387c4b7c7069b31dc","_id":"parse-json@1.0.0","_shasum":"d2b2abb5b86bb36fb50f3835a040109c5a3c9c37","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},"dist":{"shasum":"d2b2abb5b86bb36fb50f3835a040109c5a3c9c37","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/parse-json/-/parse-json-1.0.0.tgz"},"maintainers":[{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"}],"deprecated":"renamed into 'json-parse-async', use it better!","directories":{}},"1.0.1":{"name":"parse-json","description":"The missing JSON.parse async interface.","homepage":"https://github.com/Kikobeats/parse-json","version":"1.0.1","main":"./index.js","author":{"name":"Kiko Beats","email":"josefrancisco.verdu@gmail.com","url":"https://github.com/Kikobeats"},"repository":{"type":"git","url":"https://github.com/Kikobeats/parse-json"},"bugs":{"url":"https://github.com/Kikobeats/parse-json/issues"},"keywords":["JSON","parse","async","promise"],"dependencies":{"cb2promise":"~1.0.0","ensure-async":"~1.0.0","errorifier":"~0.1.3"},"devDependencies":{"browserify":"*","coffee-script":"*","coffeeify":"*","gulp":"*","gulp-header":"*","gulp-uglify":"*","gulp-util":"*","mocha":"*","should":"*","vinyl-buffer":"*","vinyl-source-stream":"*"},"engines":{"node":">= 0.10.0","npm":">= 1.4.0"},"scripts":{"test":"sh test/test.sh"},"license":"MIT","gitHead":"25928f3a558d379cf6a52b9ae416177f2463237c","_id":"parse-json@1.0.1","_shasum":"6fc95f7ba8d60a58ac4cd9ea8ec88374e85987e9","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},"dist":{"shasum":"6fc95f7ba8d60a58ac4cd9ea8ec88374e85987e9","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/parse-json/-/parse-json-1.0.1.tgz"},"maintainers":[{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"}],"deprecated":"renamed into 'json-parse-async', use it better!","directories":{}},"2.0.0":{"name":"parse-json","version":"2.0.0","description":"Parse JSON with more helpful errors","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/parse-json.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"files":["index.js","vendor"],"keywords":["parse","json","graceful","error","message","humanize","friendly","helpful","string","str"],"devDependencies":{"ava":"0.0.4","xo":"*"},"xo":{"ignores":["vendor/**"]},"gitHead":"a1c87cd506ccb52eb4aadb5eacb5d0cf54a3d84f","bugs":{"url":"https://github.com/sindresorhus/parse-json/issues"},"homepage":"https://github.com/sindresorhus/parse-json#readme","_id":"parse-json@2.0.0","_shasum":"e59e30d2642041e9a359c99613c476b1133ca428","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e59e30d2642041e9a359c99613c476b1133ca428","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/parse-json/-/parse-json-2.0.0.tgz"},"maintainers":[{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"2.1.0":{"name":"parse-json","version":"2.1.0","description":"Parse JSON with more helpful errors","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/parse-json.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"files":["index.js","vendor"],"keywords":["parse","json","graceful","error","message","humanize","friendly","helpful","string","str"],"dependencies":{"error-ex":"^1.1.0"},"devDependencies":{"ava":"0.0.4","xo":"*"},"xo":{"ignores":["vendor/**"]},"gitHead":"f91dcce91727e00a22dfe22af57575c4cbc34c77","bugs":{"url":"https://github.com/sindresorhus/parse-json/issues"},"homepage":"https://github.com/sindresorhus/parse-json#readme","_id":"parse-json@2.1.0","_shasum":"7125b5f3f679b3d1d5c7fc4cd561cc1f4576aacc","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7125b5f3f679b3d1d5c7fc4cd561cc1f4576aacc","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/parse-json/-/parse-json-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"2.2.0":{"name":"parse-json","version":"2.2.0","description":"Parse JSON with more helpful errors","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/parse-json"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"files":["index.js","vendor"],"keywords":["parse","json","graceful","error","message","humanize","friendly","helpful","string","str"],"dependencies":{"error-ex":"^1.2.0"},"devDependencies":{"ava":"0.0.4","xo":"*"},"xo":{"ignores":["vendor/**"]},"gitHead":"419b0cbb83e67af53f9fd3f7ff98605ea2020eb6","bugs":{"url":"https://github.com/sindresorhus/parse-json/issues"},"homepage":"https://github.com/sindresorhus/parse-json","_id":"parse-json@2.2.0","_shasum":"f480f40434ef80741f8469099f8dea18f55a4dc9","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f480f40434ef80741f8469099f8dea18f55a4dc9","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/parse-json/-/parse-json-2.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}}},"name":"parse-json","time":{"modified":"2017-06-30T23:40:59.346Z","created":"2015-07-28T19:05:09.989Z","1.0.0":"2015-07-28T19:05:09.989Z","1.0.1":"2015-08-03T10:29:22.749Z","2.0.0":"2015-08-25T14:14:38.170Z","2.1.0":"2015-08-26T15:15:54.581Z","2.2.0":"2015-08-31T16:36:30.005Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/parse-json"}