Created
December 13, 2018 21:45
-
-
Save nitayneeman/129879f9d76b06ff892d67800adc94b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isValidJSON(text) { | |
try { | |
JSON.parse(text); | |
return true; | |
} catch { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment