Skip to content

Empty XML elements should be represented by empty strings/collections #381

@RikkiGibson

Description

@RikkiGibson

A payload like this:

<Root>
    <Child>
        <Item>1</Item>
        <Item>2</Item>
        <Item>3</Item>
    </Child>
</Root>

causes the Root.Child property to be a List instance with 3 items.

<Root>
    <Child />
</Root>

causes the Root.Child property to be null.

Similarly, a missing String property/attribute is represented as null. Objects containing unnecessarily null collections are a pain in the butt to use. We should see if we can make them empty by default instead.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions