Description
When using the isArray to specify which tags should be an array. If the tag is empty it produces an output with an array of a single empty string. [""] instead of the expected [].
Input
<root>
<EventList></EventList>
</root>
Code
new XMLParser({
ignoreAttributes: true,
isArray: (name) => {
return name.endsWith('List');
},
});
trimValues: true,
parseTagValue: true,
These don't seem to have any change on output in this scenario either.
Output
expected data
Would you like to work on this issue?
Description
When using the
isArrayto specify which tags should be an array. If the tag is empty it produces an output with an array of a single empty string.[""]instead of the expected[].Input
Code
These don't seem to have any change on output in this scenario either.
Output
{ "EventList": [ "" ], }expected data
{ "EventList": [], }Would you like to work on this issue?