Handle better 'null' values in optional fields
While testing Haskell⇔Python interoperability for opcode serialisation, I found this bug: the Haskell code doesn't treat optional fields with 'null' values as missing, which the Python code does, leading to differences. Investigating all uses of 'maybeFromObj' and the single use of 'fromObjWithDefault' shows that these are only used in cases where we the rules are indeed "null == missing", so let's update the functions and their docstrings accordingly. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
Please register or sign in to comment