News for hackers. Stuff that matters.
Re:Show HN: Weird JSON superset with BigInt, Infinity, Typed... by stickfigure on Thursday November 26, 2020 @12:03PM (#25221703)
Nah. The notion of a "time since arbitrary epoch" is pretty universal, even though it may have a variety of representations. Just pick one, it really doesn't matter which.

Actually JavaScript already did pick a representation - milliseconds since 1970. It would be easy and unambiguous to add { "foo": T1606410158672 } to the grammar.

Re:Show HN: Weird JSON superset with BigInt, Infinity, Typed... by ben509 on Thursday November 26, 2020 @07:04PM (#25224437)
And I think nobody does that in a protocol because you're adding extra complexity to get you little more than transmitting a number.
Re:Show HN: Weird JSON superset with BigInt, Infinity, Typed... by dmitriid on Friday November 27, 2020 @02:39AM (#25226355)
You get significantly more than transmitting a number.

- You get automatic conversion to/from a known datatype, Timestamp, not to an arbitrary number

- You get automatic checks on the validity of this datatype

- You can specify exact precision of this datatype (for example, you may want to represent nanoseconds, not milliseconds, since epoch)