-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Fix for date deserialization when JSON contains dates lower than DateTime.MinValue #804
Fix for date deserialization when JSON contains dates lower than DateTime.MinValue #804
Conversation
…ed it globally to all date properties -Simplified the JSON serialization logic
@nozzlegear @davidkdb here is my PR to fix #803 |
@nozzlegear I'm bumping this up for your attention as this seems to be occurring again today, i.e. Shopify is sending webhooks with invalid dates. |
Thanks for the fix @clement911! Once the unit tests finish running I'll be able to publish to nuget, but I need to step out of the house in a few minutes. I'll set a reminder to publish this once I'm back, but feel free to ping me again if it seems like I forgot! |
That's much appreciated @nozzlegear |
Published in 5.18.7 on nuget! Thanks a ton for investigating and debugging. 🕵️ |
Awesome. Thanks for the quick release! |
It's not published yet here? |
@davidkdb There's a little bit of a delay between when the package gets published to nuget and when nuget indexes the new version and makes it available for search/download. Sometimes it can take up to an hour. |
Still not available for download.... |
https://www.nuget.org/packages/ShopifySharp/5.18.7 |
Thank you :-) It was just not visible on: https://github.com/nozzlegear/ShopifySharp |
BTW: After the fix, accepts_marketing_updated_at seems to not work anymore with invalid null date. So what was working, is not working anymore. |
Can you explain in more detail what is not working? Or even better if you can create a test that shows the issue? |
This data is received from the orders updated or order created webhook. So this is the order data. We just do:
I have removed most info, and made some adjustments in id's for security and privacy reasons. As you can see the accepts_marketing_updated_at has an invalid date, and the code fails at the DeserializeObject pointing to accepts_marketing_updated_at
|
Please try to deserialize as follows: var order = ShopifySharp.Infrastructure.Serializer.Deserialize<Order>(json); |
Fixes #803