Differentiate between datacontractserializr and xmlserializer?



Differentiate between datacontractserializr and xmlserializer?..

Answer / sriyans sharma

DataContractSerializer

Is meant to be used for serialization/deserialization of class in WCF service to and from either JSON or XML.
serializes properties and fields.
Is faster than XmlSerializer
Doesn't control how xml is generated. Should not be used when full control on generated XML structure is required
XMLSerializer

XmlSerializer is only for XML serialization
Supports full control over the XML structure
Serializes only public properties

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WCF Interview Questions

What is the request-reply mode in wcf?

0 Answers  


Do we have to use the relative addresses when hosting in the iis or the absolute addresses? Why?

0 Answers  


What are the attributes of Message Contract in WCF?

0 Answers   Viscus Infotech,


What is the use of is required property in data contracts?

0 Answers  


Is it possible for a WCF service to implement Multiple service contracts?

0 Answers   HCL,






List out the difference between XMLSerializer and the DataContractSerializer?

0 Answers  


List out what are the different isolation levels provided in WCF?

0 Answers  


Name the namespace that is used to access WCF service?

0 Answers  


What is the main advantage of was?

0 Answers  


How many types of contract wcf define?

0 Answers  


What is DataContract in WCF?

0 Answers   Petranics Solutions,


How to deal with operation overloading while exposing the wcf services?

0 Answers  


Categories