- You can send it across a network to another computer.
- You can store it in a file.
The process of converting an object into a string is referred to as serialization, while the process of converting it back is referred to as de-serialization.
In order to convert an object into a string, you need a data-format that specifies how the object should be mapped to a character string—for instance, how do you denote the properties and values of an object, and how do you encode the various data types such as numbers and arrays?
Historically most data formats have been binary: This meant that it was not possible for a human to read the formatted data and gain an understanding of its underlying structure or meaning. Typically, data was converted to and from the binary format using a proprietary algorithm.
In recent years, there has been a move toward plain-text data formats. The most notable example is XML, which uses ...