JavaScript JSON parse provided by JSON2 for IE 7

This library should only be loaded if the JSON object doesn't already exist. Otherwise, you're just wasting bandwidth. For best performance, do this by checking for the existence of the object first, then asynchronously loading it from a CDN such as the above.
if (typeof JSON === 'undefined') {
	node = document.createElement('script'); node.type = 'text/javascript'; node.async = true; node.src = '//'; s = document.getElementsByTagName('script')[0];  s.parentNode.insertBefore(node, s);
Posted by
Snippet Viewed 1685 times.

Share your JavaScript code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.


Submit | Browse

Most Recent javascript snippets

Most Viewed