ALERT

[WEBINAR] See the Whole Story: The Case for a Visualization Platform

Serialization

Definition - What does Serialization mean?

Serialization is the process of converting the state information of an object instance into a binary or textual form to persist into storage medium or transported over a network.

Serialization is executed by Common Language Runtime (CLR) to save an object‘s current state information to a temporary (like ASP.NET cache) or permanent storage (file, database, etc.) so as to be used later to update an object with this same information. It involves the conversion of public and private members of an object including the name of class and assembly into a stream of bytes, which is then written to data stream. The reverse process of converting stream of bits into an object is called deserialization.

The .NET framework offers two methods of serialization, namely, binary serialization and XML serialization. Binary serialization preserves the state of the object between different invocations of an application by preserving type fidelity. XML serialization uses XML as an open standard to serialize only the public properties and fields. It does not preserve type fidelity but provides support for serialization in human-readable, cross-platform XML. The framework provides many options to customize the serialization process to meet application requirements.

Techopedia explains Serialization

Serialization is used when large amounts of data have to be stored in flat files and retrieved at a later stage. To achieve this without serialization, it becomes too tedious, error-prone and complicated as the data structure is complex. Reflection is a technique the .NET framework provides to automatically serialize all the members of an assembly into storage. Remoting is a concept using binary serialization to send arguments in methods from one computer to another. Examples of its usage include saving session state in ASP.NET, copying objects in clipboard in Windows Forms, etc. Serialization (XML) is also used mostly on sharing data across the network without restricting the application on usage of data.

Serialization can be implemented in any .NET objects by including the attribute Serializable to the class. By tagging the OptionalField attribute to the newly added members of the class, the earlier versions of the object can be deserialized without any error. The serialization engine used in .NET framework ensures that serialization occurs only once per object and handles object graphs and circular references automatically.


This definition was written in the context of .NET

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
Tweat cdn.techopedia.com
"Techopedia" on Twitter


'@Techopedia'
Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Resources
Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.