6 ms·
> Adding timestamp to JSON . . . What are you talking about? JSON is a format for exchanging data of any kind. It doesn't have types beyond a set of primitives
by softwarebeware 5y ago
> Adding timestamp to JSON . . .
What are you talking about? JSON is a format for exchanging data of any kind. It doesn't have types beyond a set of primitives to that it can remain as a _notation_ that allows you to pass any type you define and want to send.
Nothing is stopping any library or language from implementing an object or String for dates or times (or both) and tons of them have done so.
It wouldn't be JSON's place at all to start defining anything like that.
- stickfigure 5y agoNonsense. JSON (or "JSON++") can define any arbitrary primitives. Someone already made the arbitrary decision to have boolean values instead of "true" and "false" strings; having timestamps is merely another arbitrary decision. You seem to believe that the primitives in JSON are some sort of platonically pure form. They were merely a choice, and a that choice could be improved.