Created
June 22, 2009 10:37
-
-
Save cheeaun/133914 to your computer and use it in GitHub Desktop.
JSON parsing method, uses eval() for old browsers, JSON.parse for new ones.
This file contains 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
var evalJSON = function(string){ | |
return (window.JSON && JSON.parse) ? JSON.parse(string) : eval('(' + string + ')'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment