-
Notifications
You must be signed in to change notification settings - Fork 0
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
How to serialize nulls in arrays? #44
Comments
[Test]
public void ArrayOfDifferentWithNull()
{
var value = new object[] { "abc", null, 3 };
var actual = Xml.Serialize(value);
var expected = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
"<ArrayOfObject>" + Environment.NewLine +
" <String>1</String>" + Environment.NewLine +
" <??? />>" + Environment.NewLine +
" <Int32>3</Int32>" + Environment.NewLine +
"</ArrayOfObject>";
Assert.AreEqual(expected, actual);
} |
|
Yes it makes sense but we make the null name configurable if so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dunno if using
<String />
fornull
and<String></String>
forstring.Empty
is a good idea, probably not.The text was updated successfully, but these errors were encountered: