Desirialization versus parsing

As far as I understand, deserialization turns a stream of bytes into an object.

The analysis is the same, usually turning a string into some kind of data structure.

Parses the type of deserialization? Can you consider them synonyms?

+5
source share
1 answer

Parsing is a more general term.

Desicialization is commonly used in the context of object-oriented languages. The result of deserialization is an object, and the analysis result can be any type of data.

Even in the context of creating an object, analysis is more general. If, for example, you create an object, and only part of the data required by the constructor is parsed from a file, and the rest of the data is provided as user input, I would not call it deserialization.

+7
source

Source: https://habr.com/ru/post/1246058/


All Articles