{"name":"is-json","version":"1.0.1","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","_id":"is-json@1.0.1","dist":{"shasum":"aaac1620ebb7df0820d2f30afddbe02b17b50529","tarball":"http://registry-npm.ywwl.com/is-json/download/is-json-1.0.1.tgz","integrity":"sha512-U9umyNS5Tr4ieSoQszZsGV58XgHWDCrRQ8YEfC5lFEMm16U9R+EJwYz4pdCtwi2MEfnwAM750e2RfxVFJVfWYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF7yxZn14Na0X19kP5Tc8DQYKFE47QwU11cHZW7GeRjWAiEA806AhybuXCf6Bs27p/vBtDVCmy/t2Y38NE7fOLpOsx0="}],"size":1989,"noattachment":false,"key":"/is-json/-/is-json-1.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"quim","email":"joaquim.serafim@gmail.com"},"maintainers":[{"name":"quim","email":"joaquim.serafim@gmail.com"}],"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":1398121274870,"_cnpm_publish_time":1398121274870,"dist-tags":{"latest":"3.0.1"}}