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

Mongo object to Parse object date serialization - avoid re-serialization of iso of type Date #3389

Conversation

nodechefMatt
Copy link
Contributor

If a date object stored in the database is serialized as in
{
__type : "Date",
iso : ISODate("")
}

instead of

{
__type : "Date",
iso : "Date as string"
}

The returned Parse object is invalid and has the below structure:

{
__type : "Date",
iso : {
__type : "Date",
iso : "Date as string
}
}

This PR should correct this.

@flovilmart
Copy link
Contributor

Thanks for the fix. Can you address the CI Issues as well as adding a few tests so we make sure we don't introduce regressions at a later time?

Thanks!

@nodechefMatt
Copy link
Contributor Author

Sure no problem. Will do

@nodechefMatt nodechefMatt changed the title Mongo object to Parse object date serialization - avoid nested ios Mongo object to Parse object date serialization - avoid re-serialization of iso of type Date Jan 18, 2017
@flovilmart
Copy link
Contributor

Thanks!

@facebook-github-bot
Copy link

@nodechefMatt updated the pull request - view changes

@flovilmart
Copy link
Contributor

@nodechefMatt you have an extra file in your commit, otherwise that looks great! Thanks!

@facebook-github-bot
Copy link

@nodechefMatt updated the pull request - view changes

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.

4 participants