What is datacontractserializer and how its different from xmlserializer?



What is datacontractserializer and how its different from xmlserializer?..

Answer / Namrata Singh

{"DatacontractSerializer": "A class in System.Runtime.Serialization.Json namespace used for serializing and deserializing .NET objects as JSON (JavaScript Object Notation). It's specific to WCF Data Services and is used when the data service is configured to use JSON format.",n"XmlSerializer": "A class in System.Xml.Serialization namespace used for serializing and deserializing .NET objects as XML. Unlike DatacontractSerializer, it can work with any .NET type, not just those that are marked with DataContract attribute.",n"Difference": "DatacontractSerializer is specific to JSON format and WCF Data Services, while XmlSerializer works with any .NET type and is not limited to a specific format or service."}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WCF Interview Questions

What is the one-way mode in wcf?

1 Answers  


What is wcf used for?

1 Answers  


Explain how to define a service as rest based service in wcf?

1 Answers  


WCF:Can we use the public queues without the Windows domain? If cannot then why?

1 Answers  


Can you define more than one endpoints in a service model?

1 Answers  


List the various protocols utilized in the messaging layer in wcf?

1 Answers  


What is wcf wpf wwf in net?

1 Answers  


Explain the wcf ria?

1 Answers  


Describe the terminology service versioning?

1 Answers  


In wcf which bindings supports the reliable session?

1 Answers  


WCF:Is the Reliable session asynchronous?

1 Answers  


WCF:What types of reliable messaging are implemented in the WCF?

1 Answers  


Categories