1.0.3 • Published 9 years ago

json-parse-helpfulerror v1.0.3

Weekly downloads
638,642
License
MIT
Repository
github
Last release
9 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-1984jodbjson-server-masterjson-server-plusjson-server-relationshipjson-server-s3json-server-testejson-server-visopjson-server-with-batch-insertionjson-server2json-server-cnjson-server-extjson-server-forkjson-server-sinnbojson2apijump-json-serverhai-serverkountexamplelow-file-syncimpulse-mongoimpulsedbimemento-json-serverlightningdb@cdxoo/npm-monorepo-sync-pkg-versions@cdk8s-extensions/argo-rollout@d0whc3r/json-server@dony435/json-server@gift-adv/json-server@gerhobbelt/npm-check-updates@harryy/npm-check-updatesfresh.dbgigya-toolkitorigindbkef-corenguyengx-do-api-gatewayngx-do-proxynpm-check-updatesnpm-check-updates-litenpm-check-updates-resolutionsnpm4-check-updatesnpm_cache_sharenode-flat-dbnef-fsnef-mongomock-json-server-copymistdbsdagsdfgfsdfdsas3sdagsdfgfsdfdsas5tanngotimecardsn-flutter-bootsinanews-flutter-bootxl-json-server@abstractball/json-server@alsc-sfe/kos-core@imemento/json-server@masscode/json-server@rsf/json-server@saeon/logger@saasfe/kos-core@sandstreamdev/npm-check-updates@mmis1000/json-server-split@nmyvision/json-serverblog-flutter-bootamazon-sns-cli@wll8/json-server@thg303/json-server@zlargon/json-server@tonicdev/read-package-jsonad-json-servercjsoncordova-plugin-amplify-paycordova-plugin-amplify-paymentcordova-plugin-require-bluetoothleemo-json-serverdartonian-json-serverdef-coreeosdbfds-json-serverflatlyflutter-boot
1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago