Loading ...
Sorry, an error occurred while loading the content.

json2.js

Expand Messages
  • Douglas Crockford
    I changed the stringify method s array test from if (typeof value.length === number && !value.propertyIsEnumerable( length )) { to the more reliable Miller
    Message 1 of 15 , Nov 19, 2008
    • 0 Attachment
      I changed the stringify method's array test from

      if (typeof value.length === 'number' &&
      !value.propertyIsEnumerable('length')) {

      to the more reliable Miller device

      if (Object.prototype.toString.apply(value) === '[object Array]') {

      See http://blog.360.yahoo.com/douglascrockford?p=916
    • Douglas Crockford
      json2.js is now available on Github. https://github.com/douglascrockford/JSON-js
      Message 2 of 15 , Nov 18, 2010
      • 0 Attachment
        json2.js is now available on Github.

        https://github.com/douglascrockford/JSON-js
      Your message has been successfully submitted and would be delivered to recipients shortly.