[Mono-bugs] [Bug 75662][Wis] New - XmlSerializer doesn't create
empty collections on deserialization
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Jul 29 05:53:12 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by jaak at jkowalski.net.
http://bugzilla.ximian.com/show_bug.cgi?id=75662
--- shadow/75662 2005-07-29 05:53:12.000000000 -0400
+++ shadow/75662.tmp.26030 2005-07-29 05:53:12.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 75662
+Product: Mono: Class Libraries
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: jaak at jkowalski.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: XmlSerializer doesn't create empty collections on deserialization
+
+Description of Problem:
+
+When deserializing object from XML, XmlSerializer doesn't create
+collections when there are no items in XML. MS Implementation does create
+the collection objects.
+
+Steps to reproduce the problem:
+1. Compile the attached program (mcs serialization.cs)
+2. Run (mono serialization.exe)
+
+Actual Results on Linux/Mono(r47826)
+
+=============
+serializedAs: <?xml version="1.0" encoding="utf-16"?>
+<root xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <k>0</k>
+</root>
+d2.list1 != null: False
+d2.list2 != null: False
+=============
+
+Expected Results (as on Windows/XP, .NET 1.1)
+
+=============
+serializedAs: <?xml version="1.0" encoding="utf-16"?>
+<root xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <k>0</k>
+</root>
+d2.list1 != null: True
+d2.list2 != null: True
+=============
+
+This applies to both ArrayList and custom collection classes which inherit
+from CollectionBase.
+
+Jarek
+http://blog.jkowalski.net/
More information about the mono-bugs
mailing list