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-server@d0whc3r/json-server@dony435/json-server@rsf/json-serverjson-server-extjson-server-forkjson-server-masterjson-server-plusjson-server-s3json-server-sinnbojson-server-testejson-server-cnjson-server-relationshipjson-server-visopjson-server-with-batch-insertionjson-server2jodbkef-corejson2apijump-json-servertimecard@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-updatesmock-json-server-copymistdborigindborigindb-newnpm4-check-updatesnpm_cache_sharesdagsdfgfsdfdsas3sdagsdfgfsdfdsas5node-flat-dbnef-fsnef-mongonguyengx-do-api-gatewayngx-do-proxynpm-check-updates-litenpm-check-updates-resolutionssn-flutter-bootsinanews-flutter-bootgigya-toolkitimpulse-mongoimpulsedbimemento-json-serverhai-serverlightningdblow-file-synckountexample@wll8/json-server@zlargon/json-serveramazon-sns-cliad-json-server@thg303/json-server@tonicdev/read-package-jsonblog-flutter-bootcjsondartonian-json-serverdef-corecordova-plugin-amplify-paycordova-plugin-amplify-paymentcordova-plugin-require-bluetoothleeosdbemo-json-serverfds-json-serverflutter-bootflatlyfresh.db
1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago