4 ms·
2 things I want in JSON: 1. Datetime 2. Expand the encoding to escape '<' and '>' Being able to specify a datetime as local vs utc would also be nice... so "
by rbobby 9y ago
2 things I want in JSON:
1. Datetime
2. Expand the encoding to escape '<' and '>'
Being able to specify a datetime as local vs utc would also be nice... so "2018/01/31 17:35:21.2222Z" for UTC and "2018/01/31 17:35:21.2222" for local.
As to the actual format used... that it's just a bikeshed argument waiting to happen. I picked y/m/d for no particular reason (well... other than my ancient preference for a simple sort key). I also picked 24 hour time for no particular reason (well... other than my ancient preference for a simple sort key).
No one would really care too much one way or another what the format was (so long as it was easy to generate using common server side technologies... node, php, java, .net).
- throwbsyxgsbend 9y agoYou can use Unicode escapes for < and > if you need them to be escaped. (Which is unfortunate, but defense in depth I guess.)
- gnud 9y agoIt might be nice to transfer dates as a separate type from string. But for the love of FSM, use ISO 8601 as the format! [1] 1: https://xkcd.com/1179/ https://xkcd.com/1179/