Skip to content

Instantly share code, notes, and snippets.

@bvanasse
Created September 8, 2014 19:47
Show Gist options
  • Save bvanasse/9c5d3c195ab2ab02b0db to your computer and use it in GitHub Desktop.
Save bvanasse/9c5d3c195ab2ab02b0db to your computer and use it in GitHub Desktop.
Verifying: IS JSON
function IsJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment