hololinked.serializers.serpent.SerpentSerializer
Bases: BaseSerializer
Serializer that wraps the serpent serialization protocol.
Source code in repo/hololinked/hololinked/serializers/serpent.py
Attributes
Functions
__init__
dumps
loads
register_type_replacement
classmethod
Register custom serialization function for a particular type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
the type for which the replacement function is registered |
required | |
|
the function that takes an object of the given type and returns a JSON serializable representation of the object, not bytes. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the object_type is not a type or is the type 'type' itself |