Skip to content
New issue

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

Tries to revive Date types from the JSON #69

Closed
wants to merge 1 commit into from

Conversation

etiago
Copy link

@etiago etiago commented Apr 8, 2018

I didn't write tests yet as I wanted to brainstorm about this with the developers first. This relates to issue #68 and tries to fix it by using a reviver when parsing the JSON to try and revive any string as a Date. Unfortunately there doesn't seem to be a better option in Javascript.

@msftclas
Copy link

msftclas commented Apr 8, 2018

CLA assistant check
All CLA requirements met.

@damccorm
Copy link

While I see why this might be useful, I'm concerned about a couple things. First, and most importantly, it seems like this could cause serious issues with backwards compatibility - if people are expecting a string and that suddenly shifts to a date that would cause problems. Second, albeit less importantly, this could cause issues with strings that look like dates but aren't meant to be dates.

Overall, it seems to me that this has the potential to cause more issues than its worth, especially since you should be able to just manually do the conversions on your end without too much trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants