{"name":"is-json","version":"1.1.3","description":"check if a string is a valid JSON string without using Try/Catch","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"git@github.com:joaquimserafim/is-json.git"},"keywords":["JSON","validation"],"author":{"name":"@joaquimserafim"},"license":"ISC","bugs":{"url":"https://github.com/joaquimserafim/is-json/issues"},"homepage":"https://github.com/joaquimserafim/is-json","devDependencies":{"tape":"^2.13.1"},"_id":"is-json@1.1.3","_shasum":"850c122b316830453e25f0221eb825c6ce6311ad","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"quim","email":"joaquim.serafim@gmail.com"},"maintainers":[{"name":"quim","email":"joaquim.serafim@gmail.com"}],"dist":{"shasum":"850c122b316830453e25f0221eb825c6ce6311ad","tarball":"http://registry-npm.ywwl.com/is-json/download/is-json-1.1.3.tgz","integrity":"sha512-1ksHcOiooL0QlHpVXdcwHSAh+o1wikfEItsgu/w1MDMSQPwSbVkwjBl9h7AfzOXA34VX3S7McKy+UR5QxTl9kA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWHVasYp2pNWD4R7x23HFjjdB6oAMm56lMYs7xeulcSAiAzaOJ2V+F3q4Iie+TC28+pC/op7Yt5PyDmfvjrrs9WZw=="}],"size":2272,"noattachment":false,"key":"/is-json/-/is-json-1.1.3.tgz"},"readme":"# is-json\n\n<a href=\"https://nodei.co/npm/is-json/\"><img src=\"https://nodei.co/npm/is-json.png?downloads=true\"></a>\n\n[![Build Status](https://travis-ci.org/joaquimserafim/is-json.png?branch=master)](https://travis-ci.org/joaquimserafim/is-json)\n\n\ncheck if a string is a valid JSON string without using Try/Catch and is a JSON object\n\n\n\n**V1.2**\n\n\nisJSON(str*, [passObjects=bool])\n\n*with `passObjects = true` can pass a JSON object in `str`, default to `false`\n\n\n\t  var isJSON = require('is-json');\n\n\t  var good_json = '{\"a\":\"obja\",\"b\":[0,1,2],\"c\":{\"d\":\"some object\"}}';\n\t  var bad_json = '{\"a\":\"obja\"\"b\":[0,1,2],\"c\":{\"d\":\"some object\"}}';\n\t  var str_number = '121212';\n\n\n\t  console.log(isJSON(good_json)); // true\n      console.log(isJSON(bad_json)); // false\n\t  console.log(isJSON(str_number)); // false\n\n\n\n\t  // check is an object\n\n\t  var object = {a: 12, b: [1,2,3]};\n\n\t  console.log(isJSON(object, true)); // true\n\n    // can use isJSON.strict (uses try/catch) if wants something more robust\n\n    console.log(isJSON.strict('{\\n \"config\": 123,\\n \"test\": \"abcde\" \\n}')); // true\n","publish_time":1401038256316,"_cnpm_publish_time":1401038256316,"dist-tags":{"latest":"3.0.1"}}