Skip to content

Fix keys with empty/null values from being dropped#8

Open
Levi-Montgomery wants to merge 3 commits into
colingabr:mainfrom
Levi-Montgomery:fix-dropped-empty
Open

Fix keys with empty/null values from being dropped#8
Levi-Montgomery wants to merge 3 commits into
colingabr:mainfrom
Levi-Montgomery:fix-dropped-empty

Conversation

@Levi-Montgomery

@Levi-Montgomery Levi-Montgomery commented Sep 2, 2025

Copy link
Copy Markdown

Previously empty arrays were lost during JSON -> XML traversal. This caused semantic information (the presence of an empty list) to be lost in the XML output. The change preserves that information by emitting a self-closing tag for empty arrays.

JSON input

{"ApplesList": []}

Before:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><root/>

After:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ApplesList/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant