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

Struct field with optional child element isn't parsed when child is missing #513

Closed
srowen opened this issue Jan 14, 2021 · 0 comments · Fixed by #514
Closed

Struct field with optional child element isn't parsed when child is missing #513

srowen opened this issue Jan 14, 2021 · 0 comments · Fixed by #514
Assignees
Labels
Milestone

Comments

@srowen
Copy link
Collaborator

srowen commented Jan 14, 2021

Consider:

<Foo>
    <Bar bing="123">
    </Bar>
    <Bar bing="345">
        <Baz/>
    </Bar>
</Foo>

Bar has an optional child element Baz. It turns out that when this child is missing, as in the first <Bar> tag, the element is skipped. This results in the array-valued Bar having 1 element, not 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant