Created
November 10, 2015 19:25
-
-
Save dstevensio/91d62aed517a1afe8eba to your computer and use it in GitHub Desktop.
Wrap JSON.parse in try/catch
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
try { | |
JSON.parse(jsonSource); | |
} catch (e) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment