What is serialization ?

Answer Posted / nithya.r

serialization is the process of converting an object into a
sequence of bits so that it can be stored on a storage
medium (such as a file, or a memory buffer) or transmitted
across a network connection link. When the resulting series
of bits is reread according to the serialization format, it
can be used to create a semantically identical clone of the
original object. For many complex objects, such as those
that make extensive use of references this process is not
straightforward.
Serialization is a mechanism by which you can save the
state of an object by converting it to a byte stream.
Two types:
1.Binary Serializable
2.XML Serializable
Methods:
The serializable interface is an empty interface,
it does not contain any methods. So we do not implement any
methods.
Use:
Whenever an object is to be sent over the network,
objects need to be serialized. Moreover if the state of an
object is to be saved, objects need to be serilazed.
Externalizable:
Externalizable is an interface which contains two
methods readExternal and writeExternal. These methods give
you a control over the serialization mechanism. Thus if
your class implements this interface, you can customize the
serialization process by implementing these methods.

Is This Answer Correct ?    23 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between partial and renderpartial?

587


what is entity graph in entity framework?

711


What is entity framework firstordefault?

635


What are the 3 main components of an asp.net mvc application?

623


What is representational state transfer (rest) mean?

643






What is filters in web api?

594


Explain what is the difference between view and partial view?

681


Is .net core replacing .net framework?

577


Is .net framework going away?

660


Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?

2192


What is entityset? : Entity framework

655


What is Layout in ASP.Net MVC?

674


Will c# 3.0, vb.net 9.0, atlas, or linq be included in the .net framework 3.0?

607


What are authentication filters in web api?

650


Why to use html.partial in mvc?

810