Introduction
Parse and stringify JSON data using promise to gracefully handle success and failures if the data is invalid. See the examples below for usage instructions. This module use bluebird for Promise/A+ support.
Installation
npm install json-promise
Usage Instructions
Parsing JSON data
var json = ;var str = '{"menu":{"id":"file","value":"File","popup":' '{"menuitem":[{"value":"New","onclick":"CreateNewDoc()"},' '{"value":"Open","onclick":"OpenDoc()"},{"value":"Close",' '"onclick":"CloseDoc()"}]}}}'; json ;
Stringify JSON data
var json = ;var obj = "menu": "id": "file" "value": "File" "popup": "menuitem": "value": "New" "onclick": "CreateNewDoc()" "value": "Open" "onclick": "OpenDoc()" "value": "Close" "onclick": "CloseDoc()" ; json ;
Testing
npm test