You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ListOfNumbers element do not get serialized which results in the following XML file.
<?xml version="1.0" encoding="UTF-8"?>
<Wrapper/>
First of all, is this the expected behaviour ? I find it surprising to not have an empty element in the generated XML, which I expected to look somewhat like this
If this is the expected behaviour, would you be open to a pull request adding an option to serialize empty lists as empty elements rather than discard them?
The text was updated successfully, but these errors were encountered:
Empty lists were treated as None values, which discarded them from
serialization. This commit fixes this issue by explictly checking for
None values, rather than relying on implicit boolean conversion.
Closestefra#686
Hi,
When I use the following schema
to create a
Wrapper
object with an emptyListOfNumbers
and I serialize it using the code belowThe
ListOfNumbers
element do not get serialized which results in the following XML file.First of all, is this the expected behaviour ? I find it surprising to not have an empty element in the generated XML, which I expected to look somewhat like this
If this is the expected behaviour, would you be open to a pull request adding an option to serialize empty lists as empty elements rather than discard them?
The text was updated successfully, but these errors were encountered: