Skip to content
Snippets Groups Projects
Commit ab41e29c authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

ENH: allow null values in dicts

parent 75849ca6
No related branches found
No related tags found
2 merge requests!53Release 0.1,!41ENH: allow null values in dicts
Pipeline #28750 passed
...@@ -513,6 +513,8 @@ class DictConverter(Converter): ...@@ -513,6 +513,8 @@ class DictConverter(Converter):
children.append(DictBooleanElement(name, value)) children.append(DictBooleanElement(name, value))
elif type(value) == float: elif type(value) == float:
children.append(DictFloatElement(name, value)) children.append(DictFloatElement(name, value))
elif type(value) == type(None):
continue
else: else:
children.append(DictElement(name, value)) children.append(DictElement(name, value))
warnings.warn(f"The value in the dict for key:{name} has an unknown type. " warnings.warn(f"The value in the dict for key:{name} has an unknown type. "
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
{ {
"firstname": "Miri", "firstname": "Miri",
"lastname": "Mueller", "lastname": "Mueller",
"other": null,
"email": "miri.mueller@science.de" "email": "miri.mueller@science.de"
}, },
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment