Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But there's no standard way of representing the dates as strings, or indicating that this field here is a date and not a string that happens to look like one, so nothing can rely on what you do. You can represent literally anything with a string, but you lose type information when you do.


ISO 8601 is a standard way of representing dates as strings, e.g. "2012-11-09T08:08Z".


There is a standard for representing string (see sibling comment) and your type information is the field name. So you know your document has a type if you give it a d_type field for example and then based on that you know your tstamp field is the date.


I'm not saying I can't imagine how to work around it, I'm saying that we're forced to, and likely will do so in a variety of competing ways, which degrades its usefulness as an interchange format. It means your tools, at the end points or in the middle, don't know what the data in that field is and so can't do anything useful for you that you haven't explicitly taught it to do.


Hopefully, your application knows that this field here is a date encoded in a string.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: