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
The visitors example in the README that adds an xsi:nil attribute doesn't work. The "when" function never sees values that are null. In ObjectNode.cs, members with null values are filtered out in the EnumerateMembers function before they can ever be tested by the "when" function of the visitor:
if (Context.Mode.IsSerialize()) members = members
.Where(x => x.Value.Instance != null && ...
Also, if the 'when' test did pass, the visitor action would fail when trying to create an XAttribute:
var xsiNamespace = XNamespace.Get("http://www.w3.org/2001/XMLSchema-instance");
var succeeds = new XAttribute(xsiNamespace + "nil", "true"); //Succeeds
// The following fails with XmlException "The ':' character, hexadecimal value 0x3A, cannot be included in a name."
var fails = new XAttribute("xsi:nil", "true");
The text was updated successfully, but these errors were encountered:
The visitors example in the README that adds an xsi:nil attribute doesn't work. The "when" function never sees values that are null. In ObjectNode.cs, members with null values are filtered out in the EnumerateMembers function before they can ever be tested by the "when" function of the visitor:
Also, if the 'when' test did pass, the visitor action would fail when trying to create an XAttribute:
The text was updated successfully, but these errors were encountered: