jmapc icon indicating copy to clipboard operation
jmapc copied to clipboard

Denote every field which is omitted when None.

Open EliRibble opened this issue 1 year ago • 0 comments

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

EliRibble avatar Jan 05 '24 23:01 EliRibble