In XigtXML, both of the following result in an item whose text value is None:
<item />
<item></item>
However in XigtJSON, the first results in a value of None while the second is an empty string:
{}
{"text": ""}
On serialization, however, both codecs output the first of the two variants, respectively, so a round trip with XigtJSON would lose that empty string value of the item.
Both evaluate as False in a boolean context so this bug might go unnoticed, but it's worth making them consistent to avoid surprises.
In XigtXML, both of the following result in an item whose
text
value isNone
:However in XigtJSON, the first results in a value of
None
while the second is an empty string:On serialization, however, both codecs output the first of the two variants, respectively, so a round trip with XigtJSON would lose that empty string value of the item.
Both evaluate as
False
in a boolean context so this bug might go unnoticed, but it's worth making them consistent to avoid surprises.