Skip to content

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.

2 participants