Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3280114
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:40:05+00:00 2026-05-17T19:40:05+00:00

Where exactly does serialization comes into the picture? I read about serializtion on the

  • 0

Where exactly does serialization comes into the picture? I read about serializtion on the ‘net and I have come to know that

it is an interface that if implements in a class, means that it can be automatically be serialized and deserialized by the different serializers.

Give me a good reason why and when would a class needs to be serialized? Suppose once it’s serialized, what happens exactly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:40:06+00:00Added an answer on May 17, 2026 at 7:40 pm

    Serialization is needed whenever an object needs to be persisted or transmitted beyond the scope of its existence.

    Persistence is the ability to save an object somewhere and load it later with the same state. For example:

    • You might need to store an object instance on disk as part of a file.
    • You might need to store an object in a database as a blob (binary large object).

    Transmission is the ability to send an object outside of its original scope to some receiver. For example:

    • You might need to transmit an instance of an object to a remote machine.
    • You might need to transmit an instance to another AppDomain or process on the same machine.

    For each of these, there must be some serial bit representation that can be stored, communicated, and then later used to reconstitute the original object. The process of turning an object into this series of bits is called “serialization”, while the process of turning the series of bits into the original object is called “deserialization”.

    The actual representation of the object in serialized form can differ depending on what your goals are. For example, in C#, you have both XML serialization (via the XmlSerializer class) and binary serialization (through use of the BinaryFormatter class). Depending on your needs, you can even write your own custom serializer to do additional work such as compression or encryption. If you need a language- and platform-neutral serialization format, you can try Google’s Protocol Buffers which now has support for .NET (I have not used this).

    The XML representation mentioned above is good for storing an object in a standard format, but it can be verbose and slow depending on your needs. The binary representation saves on space but isn’t as portable across languages and runtimes as XML is. The important point is that the serializer and deserializer must understand each other. This can be a problem when you start introducing backward and forward compatibility and versioning.

    An example of potential serialization compatibility issues:

    • You release version 1.0 of your program which is able to serialize some Foo object to a file.
    • The user does some action to save his Foo to a file.
    • You release version 2.0 of your program with an updated Foo.
    • The user tries to open the version 1.0 file with your version 2.0 program.

    This can be troublesome if the version 2.0 Foo has additional properties that the version 1.0 Foo didn’t. You have to either explicitly not support this scenario or have some versioning story with your serialization. .NET can do some of this for you. In this case, you might also have the reverse problem: the user might try to open a version 2.0 Foo file with version 1.0 of your program.

    I have not used these techniques myself, but .NET 2.0 and later has support for version tolerant serialization to support both forward and backward compatibility:

    • Tolerance of extraneous or unexpected data. This enables newer versions of the type to send data to older versions.
    • Tolerance of missing optional data. This enables older versions to send data to newer versions.
    • Serialization callbacks. This enables intelligent default value setting in cases where data is missing.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Out of curiosity, how exactly does binary code get converted into letters? I know
What exactly does immutable mean - that is, what are the consequences of an
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
Exactly that: Does a strings length equal the byte size? Does it matter on
I know that you can use boost serialization to serialize to a text format
Using VS2010 and .NET 4 what exactly does the ADO.NET EF wizard update when
I have question related to NSUserDefaults 's standardUserDefaults . What exactly does the standardUserDefaults
what exactly does it mean from technical point of view , I understood that
What exactly does this mean -- Maybe IRB bug!? What does that tell me
I've found a code that does exactly what I like: View/edit ID3 data for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.