-
Iustin Pop authored
This follows a conversation we had for how to deal with optional-but-required fields in JSON serialisations: fields which are optional (can be either a given type or 'null'), but where the 'null' value is required. There are just a few of these in the Python code, but we should support them nevertheless. The patch changes the 'isOptional' attribute from boolean to a custom ADT, three-typed. This allows us to keep the same path on load (which deals with both cases), but use a custom save path where we explicitly save the 'null' value. Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com>
9b156883