🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › scenarios › serialization
Data Serialization — The Hitchhiker's Guide to Python
Python’s NumPy array can be used to serialize and deserialize data to and from byte representation.
🌐
MachineLearningMastery
machinelearningmastery.com › home › blog › a gentle introduction to serialization for python
A Gentle Introduction to Serialization for Python - MachineLearningMastery.com
June 21, 2022 - Pickle can even serialize Python ... our work. For example, a trained model from Keras or scikit-learn can be serialized by pickle and loaded later instead of re-training the model every time we use it....
🌐
Python
docs.python.org › 3 › library › pickle.html
pickle — Python object serialization
February 23, 2026 - Source code: Lib/pickle.py The pickle module implements binary protocols for serializing and de-serializing a Python object structure. “Pickling” is the process whereby a Python object hierarchy is...
🌐
Tutorialspoint
tutorialspoint.com › python › python_serialization.htm
Python - Serialization
Serialization is the process of converting a Python object into a JSON string or writing it to a file. ... In the example below, we use the json.dumps() function to convert a Python dictionary to a JSON string −
🌐
Real Python
realpython.com › python-serialize-data
Serialize Your Data With Python – Real Python
December 4, 2023 - So far, you’ve seen examples of serializing Python objects to a byte stream using the standard pickle module. It’s the most versatile, efficient, and battle-proven method for object serialization in Python.
🌐
Learn Python
learnpython.org › en › Serialization
Serialization - Learn Python - Free Interactive Python Tutorial
Python supports a Python proprietary data serialization method called pickle (and a faster alternative called cPickle).
🌐
Medium
medium.com › @moraneus › python-serialization-101-unlock-the-essentials-for-your-projects-5dd8b5bbbcc5
Python Serialization 101: Unlock the Essentials for Your Projects | by Moraneus | Medium
May 17, 2024 - If you need to serialize more complex Python objects using JSON, you can leverage the jsonpickle library. jsonpickle extends the functionality of the json module to support serialization and deserialization of custom classes and complex data structures. Before starting make sure you install jsonpickle : ... Here’s an example that demonstrates serialization and deserialization of a custom Person class using jsonpickle:
🌐
TutorialsPoint
tutorialspoint.com › object_oriented_python › object_oriented_python_serialization.htm
Object Oriented Python - Object Serialization
Similarly like pickle, we can print the string with dumps and load with loads. Below is an example of that, YAML may be the most human friendly data serialization standard for all programming languages.
🌐
LearnPython.com
learnpython.com › blog › object-serialization-in-python
Object Serialization in Python | LearnPython.com
Complex objects like fast_car1 need to be custom-serialized to the JSON format by building a custom encoder in Python. The way forward essentially boils down to representing the data in a dictionary json can serialize. You create a custom encoder class that extends the JSONEncoder class in the json module, then use the normal dump() or dumps() methods. Let’s take a closer look at an example.
Find elsewhere
🌐
Medium
gaurav-adarshi.medium.com › serialization-techniques-in-python-297a4489ba87
Serialization techniques in Python | by Gaurav Kumar | Medium
April 24, 2024 - The parameter `fix_imports` comes into play when it is set to true, and the protocol is less than 3. In such cases, the pickle operation will attempt to map the new Python 3 names to the old module names used in Python 2. This is done to ensure that the pickle data stream remains readable with Python. Example: The following code illustrates the definition of a SimpleObject class, the creation of instances stored in a list, and the use of the pickle module to serialize these instances.
🌐
Python
docs.python.org › 3.4 › library › pickle.html
12.1. pickle — Python object serialization — Python 3.4.10 documentation
June 16, 2019 - This document is for an old version of Python that is no longer supported. You should upgrade, and read the Python documentation for the current stable release. ... The pickle module implements binary protocols for serializing and de-serializing a Python object structure.
🌐
DataFlair
data-flair.training › blogs › python-pickle
Python Pickle | What is Serialization in Python with Example - DataFlair
July 19, 2025 - Protocol version 4: Introduced in Python 3.4; supports very large objects, more kinds of objects, and certain data format optimizations. To serialize and deserialize, we use functions dumps() and loads(), respectively.
🌐
MindMajix
mindmajix.com › blog › python › python serialization
Python Serialization - Object Serialization & it's Overview - Mindmajix
This tutorial gives you an overview of Serialization in python which includes the concepts of Pickling in Python, & Object Serialization, and many more
🌐
Real Python
realpython.com › videos › serializing-objects
Serializing Objects in Python (Video) – Real Python
01:24 This is where pickle comes into play. pickle serializes data in a binary format, which means that it’s not human-readable. A benefit to pickle is that it works out of the box with many Python data types, including custom ones that you define, and it works very fast.
Published   December 22, 2020
🌐
GeeksforGeeks
geeksforgeeks.org › python › serialize-and-deserialize-an-open-file-object-in-python
Serialize and Deserialize an Open File Object in Python - GeeksforGeeks
July 23, 2025 - Type of serialized data: <class 'bytes'> Deserialized data: {'name': 'John', 'age': 30} Type of deserialized data: <class 'dict'> This Python script serializes a dictionary `data` into a JSON file named 'data.json', then deserializes it back ...
🌐
Diveintopython3
diveintopython3.net › serializing.html
Serializing Python Objects - Dive Into Python 3
The dump() function serializes the Python data structure and writes it to the stream object. Doing this inside a with statement will ensure that the file is closed properly when we’re done. So what does the resulting JSON serialization look like? you@localhost:~/diveintopython3/examples$ cat basic.json {"published": true, "tags": ["diveintopython", "docbook", "html"], "comments_link": null, "id": 256, "title": "Dive into history, 2009 edition"}
🌐
Udacity
udacity.com › blog › 2020 › 12 › python-serialization-getting-started.html
Python Serialization: Getting Started | Udacity
October 24, 2024 - Pickle is a native Python serialization format, so if you plan to serialize Python objects that you expect to share and use with other programming languages, be mindful of potential cross-compatibility issues. Here’s an example of object serialization with pickle:
🌐
Medium
medium.com › @ellysam › serialization-and-deserialization-in-python-a26780187359
Serialization and Deserialization in Python | by elijah samson | Medium
February 9, 2023 - YAML (Yet Another Markup Language) is a human-readable data serialization format. The PyYAML library provides support for serializing and deserializing Python objects to and from YAML. Here’s an example of how to use YAML for serialization and deserialization:
🌐
GeeksforGeeks
geeksforgeeks.org › python › serialize-and-deserialize-complex-json-in-python
Serialize and Deserialize complex JSON in Python - GeeksforGeeks
August 11, 2025 - This is because json.dumps() doesn’t know how to serialize custom objects inside other objects. Let’s explore this problem and see how to fix it. Example: This example creates a Team object that contains multiple Student objects.
🌐
Envato Tuts+
code.tutsplus.com › home › python
Serialization and Deserialization of Python Objects: Part 1 | Envato Tuts+
May 26, 2022 - The dumps() method serializes to a string. The load() method deserializes from an open file-like object. The loads() method deserializes from a string. By default, Pickle supports a textual protocol and has a binary protocol, which is more ...