Serialization

  • In serialization, objects and data structures residing in memory are transformed to stream of bits, so that they can be written to disk (for example) or sent over network

  • Basically, serialize function transforms data structure to string, which can be then sent to the recipient

  • Recipient can then deserialize the string back to data structure

  • Examples of serialization formats

    • JSON

    • YAML

    • XML

Libraries

Python

  • pickle

    • saves data as byte stream

References

Last updated