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

Changes in the JS lib from json.org

Expand Messages
  • MPCM
    Would someone shed some light on why the json.js file method of detecting arrays was changed? Array.prototype.______array = ______array ; is added And - if
    Message 1 of 1 , Jul 26, 2005
    • 0 Attachment
      Would someone shed some light on why the json.js file method of
      detecting arrays was changed?

      Array.prototype.______array = '______array'; is added

      And
      - if (arg.constructor == Array) {
      +if (arg.______array == '______array') {

      I can see that the array prototype is being extended to contain a
      property to help identify object with that prototype, but it seems an
      odd way to handle object type discovery (I don't know of another way).
      It also threw warnings/errors when I swapped over to it, and have
      swapped it back for now.

      --
      Matthew P. C. Morley
    Your message has been successfully submitted and would be delivered to recipients shortly.