Also, please add ISO-8601 dates (repeating my comment below)!
{ timestamp: new Date("2007-04-05T14:30Z") }
Also, please add ISO-8601 dates (repeating my comment below)!
{ timestamp: new Date("2007-04-05T14:30Z") }
> JSON.stringify(new Date())
"2014-03-02T15:08:55.309Z"if you encode TAI in a unix timestamp, this would be a solved problem, but due to the fact that you cannot encode the time zone in the "unix timestamp datatype", you'd also have to handle cases in which people chose another timezone.
This makes it good enough for storing data (it'd be nice if the size of the data type would be explicit) but suboptimal for interoperability with other systems that could be using a different standard
either you encode the timezone in a different field in your JSON, or someone (the JSON5 people?) could define a literal for timestamps like:
t+1393752828Z (this would also eliminate the ambiguity between timestamps and number literals)