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

611Re: [json] Re: Dates do not automatically decode

Expand Messages
  • Peter Michaux
    Dec 5, 2006
      Hi Douglas,

      On 12/5/06, Douglas Crockford <douglas@...> wrote:

      > ECMAScript Fourth Edition's String.prototype.parseJSON method will
      > take an optional hook function which will have a chance to filter
      > every object in the structure.

      Any chance you will be adding this capability to the
      http://json.org/json.js file?

      > So you can look for date objects. You
      > could also replace Data.prototype.toJSONString with a function that
      > generates those date objects.

      This seems a little confusing. "toJSONString" generates strings. Do
      you mean it would generate a string like "new Date(2006, 05, 18, ...)"
      so that when the JSON is eval'ed it autmatically converted to and
      object. I doubt you mean this because it is not portable. Is the
      "toJSONString" function involved in parsing JSON strings?

    • Show all 9 messages in this topic