What is the purpose of serialization?

Asked

Viewed 202 times

-2

What is the purpose of the serialization of objects?

2 answers

1

What is serialization, if I wanted to ask would be duplicate: What is serialization? When to use? How to implement in C#?.

Answering what you asked:

Serialization is used to work the object in a simple and agnostic form, usually to be transported from one place to another (whether it is a database storage, communication between processes and machines involved in an application that need to have the object copied, cached, or even the copy of the object in the same process in a way deep-seated (example), or for a human being to read, among other reasons).

In general this is done as a text like this has no platform and technology specifics used, but contrary to what people think is possible to be binary, which is usually more efficient.

The object in memory has a form, an organization that is unique to the platform and technology used, which is the most optimized for that, which probably does not match other technologies, or even these others find it difficult to adapt. And when I talk about technology, I’m talking about the same version. A different version can have a different organization. The internal format is implementation detail, not reliable for use. Serialization always uses a form stable, even if not optimized.

-5


According to the reply in English:

Object serialization is the conversion of an object to a series of bytes, so that this object can be easily saved on a storage device or transmitted via a communication route. Byte transmission can then be de-serialized, i.e., converted again into a replica of the original object.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.