Rajanikant Hawaldar
Can you explain me what you mean by Serialization and Deerialization?

Can you explain me what you mean by Serialization and Deerialization?

By Rajanikant Hawaldar in C# on Jul 14 2021
  • Sonil  Kumar
    Jul, 2021 25

    Serialization is - Converting an objects into stream of bytes so you store it or transfer over the wire(Network). Desiralization** is just vica versa and getting the object again in memory.
    Serializaton is used anywhere where you have to send/receive data over the wire. Example are:-
    caching systems, which store the state of object is memory or other machine and give it back whenever needed.
    WCF service were using it with Durable service concept.
    Web API/Rest API are using JSON/XML/SOAP/Binary serialization to transfer the result to the caller.

    Serializable atrribute is used to make any object serializable. Although few complex objects cannot serialize directly. So you have to write custom logic for that.

    Dotnet core 3.1 has migrated Newtonsoft.Json to System.Text.Json. Which is much faster that Newtonsoft.Json. So try to use it.

    • 4
  • Shweta Lodha
    Jul, 2021 25

    Serialization - Converting object into stream of bytes
    Deserialization - Converting stream of bytes to object

    • 1
  • Rajeev Kumar
    Mar, 2023 17

    There are many situations where we need to convert class objects to XML and XML to class objects in real-time projects. But mainly in short term as below- Serialization - Converting object into stream of bytes
    Deserialization - Converting stream of bytes to object

    • 0
  • Aravind  Govindaraj
    Mar, 2022 6

    Consider this case when u have raw xml or json.. if you want to convert those into object that's called as deserialzation.... and vise versa is serlization

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS