-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve jbuilder serialization for Oj gem #3210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks Alberto!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
v2.9.1 fixes this problem. No need to backport anything. |
@pelargir thanks! I think we can still keep these changes, even it's no more a bug. |
@ericsaupe @jacobherrington This is no more strictly required but it's a nice to have if we want to support serializing with |
53d1ca2
to
85141c4
Compare
We were not testing that Float::Infinity serialization is working correctly here.
Be sure we are checking that Float::Infinity is being serialized correctly.
This will be used also in the _product partial. We can't represent Float::INFINITY in JSON: Under JSON this would be NULL Under oj this would error
Float::Infinity serialization is broken with Oj gem, see solidusio#2495 (comment) This commit makes sure we are always nullifying total_on_hand before passing trying to serialize it, if it is a Float::Infinite.
85141c4
to
71a1ef7
Compare
Description
This PR makes sure we are always nullifying total_on_hand before passing trying to serialize it, if it is a
Float::Infinity
, which was causing issues withoj
.Checklist: