What is serialization ?

Answer Posted / guest

Serialization is the process of converting an object into a
stream of bytes. Deserialization is the opposite process of
creating an object from a stream of bytes.
Serialization/Deserialization is mostly used to transport
objects (e.g. during remoting), or to persist objects (e.g.
to a file or database).Serialization can be defined as the
process of storing the state of an object to a storage
medium. During this process, the public and private fields
of the object and the name of the class, including the
assembly containing the class, are converted to a stream of
bytes, which is then written to a data stream. When the
object is subsequently deserialized, an exact clone of the
original object is created.
? Binary serialization preserves type fidelity, which is
useful for preserving the state of an object between
different invocations of an application. For example, you
can share an object between different applications by
serializing it to the clipboard. You can serialize an object
to a stream, disk, memory, over the network, and so forth.
Remoting uses serialization to pass objects "by value" from
one computer or application domain to another.
? XML serialization serializes only public properties and
fields and does not preserve type fidelity. This is useful
when you want to provide or consume data without restricting
the application that uses the data. Because XML is an open
standard, it is an attractive choice for sharing data across
the Web. SOAP is an open standard, which makes it an
attractive choice.
There are two separate mechanisms provided by the .NET class
library - XmlSerializer and SoapFormatter/BinaryFormatter.
Microsoft uses XmlSerializer for Web Services, and uses
SoapFormatter/BinaryFormatter for remoting. Both are
available for use in your own code.

Is This Answer Correct ?    62 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain covariance and contra-variance in .net framework 4.0. Give an example for each.

570


What is the difference between adding routes, to a webforms application and to an mvc application?

543


What is meant by bootstrap in mvc5?

635


Can we free memory explicitly without waiting for garbage collector to free the memory in .net compact framework?

533


What are bundling & minification features in asp.net mvc 4?

533






What is conceptual model? : Entity framework

528


what is dot net? what is use dot net? what is benifit of dot net?what is vb dot net? what is ado dot net? what is c#?

1803


What is .net framework & its benefits?

516


Is the following route definition a valid route definition? {controller}{action}/{id}

749


Explain test driven development (tdd) ?

559


what is split entity?

601


What is meant by domain model?

538


What does a viewmodel do?

521


Explain something about model, view and controllers in asp.net mvc?

556


Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?

502