Serialization is the process of taking an object and converting it to a format in which it can be transported across a network or persisted to a storage location. The storage location could be as simple as using a file or a database.
The serialized format contains the object's state information.
Deserialization is the process of using the serialized state information to reconstruct the object from the serialized state to its original state. In essence, the process of serialization allows an object to be serialized, shipped
across the network for remoting or persisted in a storage location such as the ASP.NET cache, and then be reconstructed for use at a later point in time.
See for example
https://msdn.microsoft.com/en-us/library/ms233843.aspx: "Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an
object in order to be able to recreate it when needed. The reverse process is called deserialization."
For example
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api does this for you without having to think much about it. You'll have a JavaScript object client side that you'll send to your server side API where you'll
get it as a C# object. So the client side object is "serialized" client side and its data transmitted inside the http request (possibly using JSON) and on the server side, the http request is processed to recreate a C# object. The whole plumbing is done for
you and it feels like you just sent an object over the wire...
Serialization is the process of going from in memory representation of an object to a disk based format which can be in any form like binary, JSON, BSON, XML, etc.
Deserialization is the reverse process, in which you get an object from the disk based format.
If you want to get more information, you could refer to the following links.
Member
42 Points
101 Posts
What is serialization and deserialization in c#
Sep 15, 2015 09:01 AM|K.Ajay Singh|LINK
Can some one please explain me What is serialization and deserialization in simple words . Example will help better
Contributor
4390 Points
871 Posts
Re: What is serialization and deserialization in c#
Sep 15, 2015 09:13 AM|Mukesh_Kumar|LINK
Hi,
In simple word...
Serialization is the process of taking an object and converting it to a format in which it can be transported across a network or persisted to a storage location. The storage location could be as simple as using a file or a database. The serialized format contains the object's state information.
Deserialization is the process of using the serialized state information to reconstruct the object from the serialized state to its original state. In essence, the process of serialization allows an object to be serialized, shipped across the network for remoting or persisted in a storage location such as the ASP.NET cache, and then be reconstructed for use at a later point in time.
for more info refer this link.
http://www.codeproject.com/Articles/36781/Serialization-and-Deserialization-in-ASP-NET-with
https://blog.udemy.com/csharp-serialize-to-xml/
Hope this will help you.
thanks
All-Star
40120 Points
12972 Posts
Re: What is serialization and deserialization in c#
Sep 15, 2015 09:20 AM|PatriceSc|LINK
Hi,
See for example https://msdn.microsoft.com/en-us/library/ms233843.aspx: "Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization."
For example http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api does this for you without having to think much about it. You'll have a JavaScript object client side that you'll send to your server side API where you'll get it as a C# object. So the client side object is "serialized" client side and its data transmitted inside the http request (possibly using JSON) and on the server side, the http request is processed to recreate a C# object. The whole plumbing is done for you and it feels like you just sent an object over the wire...
Star
8490 Points
1446 Posts
Re: What is serialization and deserialization in c#
Sep 16, 2015 04:02 AM|Klein Zhang|LINK
Hi K.Ajay Singh
Serialization is the process of going from in memory representation of an object to a disk based format which can be in any form like binary, JSON, BSON, XML, etc.
Deserialization is the reverse process, in which you get an object from the disk based format.
If you want to get more information, you could refer to the following links.
http://aspalliance.com/983_Introducing_Serialization_in_NET.all
https://msdn.microsoft.com/en-us/library/ms731073.aspx
https://msdn.microsoft.com/en-us/library/ms233843.aspx
I hope it's helpful to you.
Best Regards
Klein zhang