jmapc
jmapc copied to clipboard
Denote every field which is omitted when None.
There are some fields that can be sent with null values over JSON, which means they are set to None within Python. The broad config-based exclude directive is not given any information about the field, only it's value, so we can't use it to determine if a field should be excluded or not in the dict that gets built.
Instead we create a helper function to build a field definition that has the necessary exclude function. Any field that does not use this helper function is permitted to be None/null. This is true of the MailboxGet.ids field in this commit. A new test is added to maintain the behavior over time.
Resolves #105