1.0.3 • Published 10 years ago

json-parse-helpfulerror v1.0.3

Weekly downloads
638,642
License
MIT
Repository
github
Last release
10 years ago

json-parse-helpfulerror

A drop-in replacement for JSON.parse that uses https://npmjs.org/jju to provide more useful error messages in the event of a parse error.

Example

Installation

npm i -S json-parse-helpfulerror

Use

var jph = require('json-parse-helpfulerror');

var notJSON = "{'foo': 3}";     // keys must be double-quoted in JSON

JSON.parse(notJSON);            // throws unhelpful error

jph.parse("{'foo': 3}")         // throws more helpful error: "Unexpected token '\''..."

License

MIT

another-json-server@saeon/ol-react@saeon/quick-form@r35007/mock-server-litejson-server-custom-router@infinitebrahmanuniverse/nolb-json-p@srmagura/npm-check-updatesnpm-check-future@everything-registry/sub-chunk-1984tanngoxl-json-serversdagsdfgfsdfdsas3sdagsdfgfsdfdsas5mistdbmock-json-server-copyjodbjson-server-masterjson-server-plusjson-server-relationshipjson-server-s3json-server-sinnbojson-server-testejson-server-visopjson-server-with-batch-insertionjson-server2json-server-cnjson-server-extjson-server-forkjson2apilow-file-synclightningdbkountexampleimemento-json-serverimpulse-mongoimpulsedbhai-serverkef-corejump-json-servergigya-toolkitorigindbnpm4-check-updatesnpm_cache_sharenguyengx-do-api-gatewayngx-do-proxynode-flat-dbnef-fsnef-mongonpm-check-updates-litenpm-check-updates-resolutionssn-flutter-bootsinanews-flutter-boottimecard@alsc-sfe/kos-core@cdk8s-extensions/argo-rollout@cdxoo/npm-monorepo-sync-pkg-versions@abstractball/json-server@crannbog/json-server@harryy/npm-check-updates@gift-adv/json-server@gerhobbelt/npm-check-updates@masscode/json-server@nmyvision/json-server@mmis1000/json-server-split@imemento/json-server@qianzhong516/json-server-extended@saasfe/kos-core@saeon/logger@sandstreamdev/npm-check-updates@d0whc3r/json-server@dony435/json-server@rsf/json-servereosdbemo-json-server@thg303/json-serverfds-json-server@tonicdev/read-package-json@wll8/json-serverad-json-server@zlargon/json-serveramazon-sns-cliflutter-bootflatlyfresh.dbblog-flutter-bootcordova-plugin-amplify-paycordova-plugin-amplify-paymentcjsondartonian-json-servercordova-plugin-require-bluetoothledef-core
1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago