Marshalling and Serialization

These 2 concepts you will often encounter when writing applications especially dealing with data and communication between 2 programming languages.

They seem synonymous to each other but have slight difference.

Serialization is a process of converting an object ready to be written on disk and transmission. In layman’s term object converted into bytes.

Marshalling is to serialize an object just like the explanation above but also gives functionality to convert them back to their original form. Let say C# object serialized and written to disk as “file.dat”, and for C++ to read the file, and a function gets exported as well. When you call that function the data inside the object gets return and process of marshalling concludes.

This also copy and pasted from the link:

In regards to commonality between marshalling and serialization, they both have in common to allow streaming of a representation of an object or a hierarchy of objects to typically be put in a medium (file, memory) for the reverse process to restore the initial object or object hierarchy.

Reference link below:


Leave a Reply

Your email address will not be published. Required fields are marked *