You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XML elements can be defined in its XML schema as optional. Usually, a missing XML attribute is assigned a NULL value at de-serialization. Consider these 2 examples:
<a attr1="val1">some text</a>
<a>some text</a>
which should both deserialize to some struct called a with a member for the text node. However, they are converted differently:
{"a":{"text":"some text","attr1":"val1"}}
{"a":"some text"} when a more appropriate output would be `{"a":{"text":"some text"}}
This is somewhat similar to issue #6 and can probably be solved through a config option to force some simple XML nodes into an object form of JSON.
The text was updated successfully, but these errors were encountered:
XML elements can be defined in its XML schema as optional. Usually, a missing XML attribute is assigned a NULL value at de-serialization. Consider these 2 examples:
<a attr1="val1">some text</a>
<a>some text</a>
which should both deserialize to some struct called
a
with a member for the text node. However, they are converted differently:{"a":{"text":"some text","attr1":"val1"}}
{"a":"some text"}
when a more appropriate output would be `{"a":{"text":"some text"}}This is somewhat similar to issue #6 and can probably be solved through a config option to force some simple XML nodes into an object form of JSON.
The text was updated successfully, but these errors were encountered: