// native JSON support. // developer.mozilla.org/en/JSON // this will also succeed if you've loaded the JSON2.js polyfill ahead of time // ... but that should be obvious. :) Modernizr.addTest('json', !!window.JSON && !!JSON.parse);