We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The recursive json nesting function of lakify will omit free-floating text when other children are present. For e.g.
<iati-activity> Floating text <iati-identifier>ACT-1</iati-identifier> </iati-activity>
Would be serialized as:
{ "iati-activity": [ { "iati-identifier": [ { "text()": "ACT-1" } ] } ] }
Where one might expect:
{ "iati-activity": [ { "text()": "Floating text", "iati-identifier": [ { "text()": "ACT-1" } ] } ] }
This is because this floating text is not captured by element.text. It is, however, captured by element.itertext and could be derived like so:
element.text
element.itertext
inner_text = ''.join([inner_string.strip() for inner_string in element.itertext(tag=element.tag)])
Discovered while writing tests in PR #289
The text was updated successfully, but these errors were encountered:
Test for issue #291. XML edgecases in lakify hierarchical json nest.
8364bc4
Amend lakify recursive_json_nest function to address issue #291
3d2318b
Fixed with PR #292
Sorry, something went wrong.
No branches or pull requests
The recursive json nesting function of lakify will omit free-floating text when other children are present. For e.g.
Would be serialized as:
Where one might expect:
This is because this floating text is not captured by
element.text
. It is, however, captured byelement.itertext
and could be derived like so:Discovered while writing tests in PR #289
The text was updated successfully, but these errors were encountered: