douglascrockford / JSON-js

JSON in JavaScript
http://www.JSON.org/
8.7k stars 4.59k forks source link

Add support for dates from another context #45

Closed sstur closed 12 years ago

sstur commented 12 years ago

Date.prototype is extended in this context with toJSON but dates from another context/frame slip through as plain objects. Object.prototype.toString should be used to catch dates similar to how it is used for arrays.

douglascrockford commented 12 years ago

I want to keep json2.js stable, so I am reluctant to make changes except for significant errors. I recommend instead that you load json2.js in that other frame.

sstur commented 12 years ago

Sure. I respect that policy, and I appreciate how stable this library is. Thanks.

anthonybrown commented 12 years ago

A bit off topic here, but I am getting errors when I include a JSON2 file, unless I place it in the last position. Is this the norm?

On Mon, Oct 29, 2012 at 11:50 AM, Simon Sturmer notifications@github.comwrote:

Sure. I respect that policy, and I appreciate how stable this library is. Thanks.

— Reply to this email directly or view it on GitHubhttps://github.com/douglascrockford/JSON-js/pull/45#issuecomment-9872273.

douglascrockford commented 12 years ago

Of course not.