I know there's 3 type s of serialization in .net :
Soap , Xml , Binary.
Wcf instructed the DataContract attribute which also serialize ... but via what ?
Binary is not - i know.
So by which mechanism ?
Windows Communication Foundation (WCF) uses the DataContractSerializer as its default serialization engine to convert data into XML and to convert XML back into data. The DataContractSerializer is designed to serialize data contract types.
DataContractSerializer as the Default By default WCF uses the DataContractSerializer class to serialize data types.
For an introduction to data contracts, see Using Data Contracts. When deserializing XML, the serializer uses the XmlReader and XmlWriter classes. It also supports the XmlDictionaryReader and XmlDictionaryWriter classes to enable it to produce optimized XML in some cases, such as when using the WCF binary XML format.
It is the binding defined for the given endpoint which specifies the serialization mechanism. For example:
basicHttpBinding
and wsHttpBinding
use SOAPnetTcpBinding
uses binary serializationwebHttpBinding
could use XML, Json, ...You can read more about the different built-in bindings and their properties on this article. Thanks to the extensibility of WCF you could of course write your own custom bindings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With