3 ms·
That is not a good reason though. The spec could just decide on the wire format like with strings and numbers, and clients would have to translate into the date
by goto11 7y ago
That is not a good reason though. The spec could just decide on the wire format like with strings and numbers, and clients would have to translate into the date type of the language or platform.
The reason JSON doesn't have dates is simply because JavaScript doesn't have date literals. You can write new Date(...) in JavaScript, but allowing that in JSON would have opened a whole can of worms.
- BillinghamJ 7y agoJSON started already having incompatibilities with JS literals - JS objects are only just being made a superset of JSON in ES2019