Parse JSON safely without throwing
var safeParse = require("safe-json-parse") safeParse("{}", function (err, json) { /* we have json */ }) safeparse("WRONG", function (err) { /* we have err! */ })
npm install safe-json-parse