The process of converting a structured object into a sequence of bytes which can be stored in a file system or database or sent through the network is called serialization. The reversed process is called deserialization, which means reconverting a sequence of bytes into a structured object. Creating an object via deserialization is usually faster than initializing from a class.
将结构化对象转换为可以存储在文件系统或数据库中或通过网络发送的字节序列的过程称为序列化。反之,把字节序列转化成结构对象的过程称为反序列化。
Python实现序列化的方式
基于文本的序列化格式:CSV, JSON, XML, YAML, TOML
基于二进制的序列化格式:protobuf, Avro, pickle