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

    > JSON.parse("{\"date\":\"2014-03-02T16:08:43.444Z\"}")
    Object {date: "2014-03-02T16:08:43.444Z"}


Yes, but it is trivial to then convert it to a date with the new Date() constructor.


But it's not trivial to know that it's a date.

It's ok if you are expecting a Date. But when you want to write generic code that "discover" the properties, then you have to do dirty things, like trying to parse every single strings as a date.




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

Search: