validjson

JSON.parse with a try/catch

npm install validjson
1 downloads in the last week
4 downloads in the last month

validJSON

Returns either a parsed {Object} or {Boolean} false.

Usage

var validjson = require('validjson');
var str = '{"ok": 2013}';
var obj = validjson(str);
if (obj) {
    console.log(obj);
}
npm loves you