jazzband / jazzband/jsonmodels

ListField does not respect value None (default value is []).

Open
#92 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
343
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Basically, there is no way to get rid of a ListField element in output json.
For other fields, you set them to None and it will be removed from output of to_struct(), but this does not apply to ListField. I reckon, ideally, None value should remove it from json and [] should put a [] in json.
It looks like the default value for ListField is [] so there is no way for to_struct() to understand whether user set the field to None, [] or left it unassigned.
Also, it looks like 'required' and 'nullable' properties are ignored for ListField.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.