I am trying DataContractSerialization for the first time and I would like to see the results of my serialization. Some fields seem to be missing, and it is difficult trying to debug it without being able to see what is being serialized.
I have tried both the CreateBinaryWriter and tried the CreateTextWriter with the hope I could view what it serialized:
Dim str As New MemoryStream()
Dim dcs As New DataContractSerializer(GetType(CustomerAccount))
'Using w As XmlDictionaryWriter = XmlDictionaryWriter.CreateBinaryWriter(str)
' dcs.WriteObject(w, Me)
Using w As XmlDictionaryWriter = XmlDictionaryWriter.CreateTextWriter(str)
In either case, I cannot find a way to view the results with actually deserializing back to an object.
(I have used the XMLSerializer in the past and it was always easy to see the result of the serialization without actually deserializing.)
Any tips would be appreciated.
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
View Complete Post