Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xml nullkey #93

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Xml nullkey #93

wants to merge 9 commits into from

Conversation

brchrisman
Copy link

Got back to tracking down this type issue of char vs wchar_t. Patch doesn't cast unless a null key is found.

boost::property_tree can have nulls as keys.
In particular, json read typically generates child nodes with null keys
as part of array processing.
Place a nonce (3cb6534e-d358-4705-9e74-fee06453661e) as a unique tag
name for null keys in write_xml.
@brchrisman brchrisman closed this Jan 6, 2022
@brchrisman brchrisman reopened this Jan 6, 2022
@ashtum
Copy link
Collaborator

ashtum commented Nov 17, 2023

@brchrisman, could you please provide some background on this? What issue is it designed to address?

@brchrisman
Copy link
Author

@brchrisman, could you please provide some background on this? What issue is it designed to address?

A property-tree with nulls as keys serializes to broken XML (having null tag names like <>foo</>).
This patch places a nonce in there that is placed in serialize and elided in unserialize.

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.

None yet

2 participants