deserialize()
Deserialize bytes back into a Python object.
Usage
deserialize(data)Reconstructs a Python object from a byte string that was previously created by serialize.
Parameters
data: bytes-
A byte string produced by serialize.
Returns
object-
The reconstructed Python object.
Raises
ValueError-
If the byte string is corrupted or invalid.
Examples
>>> original = {"key": "value"}
>>> data = serialize(original)
>>> deserialize(data)
{'key': 'value'}See Also
- serialize(): Convert a Python object to bytes.