Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
HanyouHottie
5 months ago
|
parent
|
context
|
favorite
| on:
Temporal: The 9-year journey to fix time in JavaSc...
Instead of using the reviver you can deserialize as a plain string, then later reassign the property as the type you want. E.g.:
const myObject = JSON.parse(text); myObject.date = new Date(myObject.date);
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: