-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Exception encoding nulled long #590
Comments
This is a general comment about nulled fields in general. not just long. |
There is no particularly important reason not to support ´null`. I just skipped it to save the additional assertion, i.e. here ("if(%s!==undefined&&util.longNe(%s,%d,%d))", ref, ref, field.defaultValue.low, field.defaultValue.high); but I am also OK with supporting this again. |
Thank you! This is the last remaining issue(so far) in our migration from 5 to 6. Its coming along nicely. |
I've added this for optional long fields especially now because any other objects would be messages, which default to |
When encoding a long field set to null (which is typical of a JSON object), instead of the field being ignored the code throws an exception. I don't see a reason not to support the old behavior. Null or undefined override on a nulled field should ignore it from being encoded on the byte stream.
The text was updated successfully, but these errors were encountered: