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

1087Re: Double quotes around ISO date string?

Expand Messages
  • Douglas Crockford
    Jul 7 12:12 PM
    • 0 Attachment
      --- In json@yahoogroups.com, "geoffrey.mcgill" <geoff@...> wrote:
      >
      > Maybe I'm just going crazy, but in a previous version of json.js (or
      > maybe json2.js) did the .toISOString function wrap an extra set of ""
      > (double quotes) around the converted date string?

      I think you are confusing toJSON with toJSONString. The toJSON method
      (which is supported by json2.js and is likely to be included in the
      next ECMAScript standard) allows an object to specify a value that
      will be serialized. The toJSONString method (which is no longer
      recommended) allows an object to return its own serialization string.
    • Show all 2 messages in this topic