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

json.js

Expand Messages
  • Douglas Crockford
    The json.js reference implementation now produces date strings in the ISO Z format, in anticipation of the addition of Date.prototype.toISOString to
    Message 1 of 13 , Jul 20, 2007
      The json.js reference implementation now produces date strings in the
      ISO Z format, in anticipation of the addition of
      Date.prototype.toISOString to ECMAScript.

      http://www.JSON.org/json.js
    • Douglas Crockford
      I changed the way that json.js calls the hasOwnProperty method. A design flaw in JavaScript causes hasOwnProperty to fail when an object contains a property
      Message 2 of 13 , Aug 5 1:25 PM
        I changed the way that json.js calls the hasOwnProperty method. A
        design flaw in JavaScript causes hasOwnProperty to fail when an object
        contains a property called "hasOwnProperty".

        http://json.org/json.js
      • Douglas Crockford
        The toJSONString methods can now take an optional whitelist parameter, an array of strings. It is used to select the properties that will be included in the
        Message 3 of 13 , Aug 19 7:58 AM
          The toJSONString methods can now take an optional whitelist parameter,
          an array of strings. It is used to select the properties that will be
          included in the JSON text.

          http://www.json.org/json.js
        • Julian Tonti-Filippini
          I wanted to modify json.js to add RegExp support so I added the following: RegExp.prototype.toJSONString = function () { return this.toString().toJSONString();
          Message 4 of 13 , Oct 3, 2007
            I wanted to modify json.js to add RegExp support so I added the following:

            RegExp.prototype.toJSONString = function () {
            return this.toString().toJSONString();
            };

            ...and found that it didn't work under Firefox because the typeof
            RegExp is 'function' rather than 'object'. This required modification
            of the switch in Object.prototype.toJSONString to add a fall-through
            case for 'function'.

            My gut tells me that there's something criminally wrong about does
            this. Can someone tell me why?

            - Julian
          • Douglas Crockford
            A new version of json.js is available. It corrects a problem in parseJSON where it was possible to have the contents of one of the caller s variables included
            Message 5 of 13 , Oct 5, 2007
              A new version of json.js is available. It corrects a problem in
              parseJSON where it was possible to have the contents of one of the
              caller's variables included in the decoded value.

              http://www.JSON.org/json.js
            • Douglas Crockford
              A design error in Firefox could allow parseJSON to include an eval function object in the resulting JSON object. This situation will now raise an exception.
              Message 6 of 13 , Oct 10, 2007
                A design error in Firefox could allow parseJSON to include an eval
                function object in the resulting JSON object. This situation will now
                raise an exception.

                http://www.JSON.org/json.js
              Your message has been successfully submitted and would be delivered to recipients shortly.