We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not sure how I'm just now noticing this, but dates in JSON are strings, so they're quoted ie., "\"2024-12-31T23:59:59\""
"\"2024-12-31T23:59:59\""
... but when we deserialize dates, we are forgetting to strip off the quotes:
as-json/assembly/deserialize/date.ts
Line 6 in 6853212
The effect is strange:
const d = JSON.parse<Date>('"2024-12-31T23:59:59"'); console.log(d.toISOString()); // 0000-12-31T23:59:59.123Z
The quotes somehow make Date.fromString skip the year component.
Date.fromString
json-as version 0.9.28
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Not sure how I'm just now noticing this, but dates in JSON are strings, so they're quoted ie.,
"\"2024-12-31T23:59:59\""
... but when we deserialize dates, we are forgetting to strip off the quotes:
as-json/assembly/deserialize/date.ts
Line 6 in 6853212
The effect is strange:
The quotes somehow make
Date.fromString
skip the year component.json-as version 0.9.28
The text was updated successfully, but these errors were encountered: