---
title: "What is serialization?"  
description: "What is serialization?"  
author: "Shikhar Arora"  
published: 2019-12-06  
canonical: https://answers.mindstick.com/qa/92484/what-is-serialization  
category: "programming language"  
tags: ["c#", ".net programming"]  
reading_time: 2 minutes  

---

# What is serialization?

What is [serialization](https://www.mindstick.com/articles/11917/serialization-in-java)

## Answers

### Answer by Harshal Vispute

**The process of transforming an item into a stream of bytes in order to store or transport it to memory, a [database](https://answers.mindstick.com/qa/93961/how-to-select-distinct-data-from-database), or a file is known as serialization**. Its major purpose is to save the state of an object so that it can be recreated later. **Deserialization** is the opposite of **serialization**. \
The data is serialized from the object into a stream. Information concerning the object's kind, such as version, **culture**, and **assembly** name, may also be included in the stream. The item can be stored in a **[database](https://answers.mindstick.com/qa/93961/how-to-select-distinct-data-from-database)**, a file, or memory using that stream. \
**Serialization** allows a developer to save an object's state and re-create it as needed, allowing for both object storage and data transmission. \
A developer can use serialization to execute tasks like:\
\

- Using a web service to send the object to a distant application
- Object transfer from one domain to another
- Using a **JSON** or **XML** string to pass an object via a firewall
- Keeping security or user-specific data consistent across applications

In **computing**, **serialisation** or **serialization** is the process of transforming a data structure or object state into a format that can be saved (e.g., in a file or **RAM** data buffer) or communicated (e.g., over a computer network) and then rebuilt in a new computer environment.

When the resulting series of bits is reread using the serialization format, a semantically identical clone of the original object can be created. This technique is not straightforward for many sophisticated objects, such as ones that use a lot of references. Serialization of object-oriented objects does not include any of the methods that were previously connected with them.

In some cases, serializing an item is also referred to as marshaling an object. **Deserialization**, on the other hand, extracts a data structure from a series of bytes (also called unserialization or unmarshalling).\


---

Original Source: https://answers.mindstick.com/qa/92484/what-is-serialization

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
