Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Exception encoding nulled long #590
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.
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.
added a commit
Dec 29, 2016
I've added this for optional long fields especially now because any other objects would be messages, which default to