Skip to content

Instantly share code, notes, and snippets.

@yoko
Created March 26, 2010 15:11
Show Gist options
  • Save yoko/344999 to your computer and use it in GitHub Desktop.
Save yoko/344999 to your computer and use it in GitHub Desktop.
// prototype.js breakes native JSON
if (String.prototype.evalJSON && Object.toJSON)
window.JSON = {
parse: function(str) { return str.evalJSON(); },
stringify: function(obj) { return Object.toJSON(obj); }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment