CSC/ECE 517 Fall 2013/ch1 1w05 st
Serialization
Serialization[1] is the process of converting an object or a group of objects into a stream of bytes or string to facilitate storage in memory or transmission over a network. The process of Serialization is also referred to as Marshalling. De-serialization is the process of converting the stream of bytes or string back to objects in memory. This process of de-serialization is also referred to as Unmarshalling.
Serialization in Ruby:
Let us consider a situation where two Ruby programs have to communicate with each other. One of the simplest way to do this is to convert the Ruby objects in the first programs into strings and writing these strings into a file. This is nothing but serialization. The second program can read this file and convert the strings back into Ruby objects. This is de-serialization.