DEV Community

Discussion on: What is the difference between parsing and serialization?

Collapse
 
deciduously profile image
Ben Lovy • Edited

Parsing is the process of reading input and understanding it semantically as data structures. Serialization is the process of taking data structures and writing them to a textual format.

Deserialization is the opposite process, of taking a text format and building a data structure. The difference to parsing is that when deserializing, your data is still formatted. You expect this text format to adhere to a standard. When parsing, you are writing logic to turn one format of input into another, deserialization in my understanding is more just exchanging between alternate representations of the same data format.