Something like:
var jsonString = \'{ \"Id\": 1, \"Name\": \"Coke\" }\';
//should be true
IsJsonString(jsonString);
//should be false
IsJsonString(\"foo\");
I think I know why you want to avoid that. But maybe try & catch !== try & catch. ;o) This came into my mind:
var json_verify = function(s){ try { JSON.parse(s); return true; } catch (e) { return false; }};
So you may also dirty clip to the JSON object, like:
JSON.verify = function(s){ try { JSON.parse(s); return true; } catch (e) { return false; }};
As this as encapsuled as possible, it may not break on error.