# 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

* [Serialization - A Crash Course (Youtube)](https://www.youtube.com/watch?v=uS37TujnLRw)
* [A Gentle Introduction to Serialization for Python (https://machinelearningmastery.com/)](https://machinelearningmastery.com/a-gentle-introduction-to-serialization-for-python/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.tatusl.dev/programming/concepts/serialization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
