Can you explain me what you mean by Serialization and Deerialization?
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.
Serialization - Converting object into stream of bytesDeserialization - Converting stream of bytes to object
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 bytesDeserialization - Converting stream of bytes to object
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