bec_lib.serialization.SerializationRegistry#
- class SerializationRegistry[source]#
Bases:
object
Registry for serialization codecs
Methods
Register codec for BECMessage
Register an encoder and a decoder
Register BEC custom numpy encoder as a codec.
Register an encoder and a decoder that can convert a python object into data which can be serialized by msgpack.
Register codec for set
- register_ext_type(encoder, decoder)[source]#
Register an encoder and a decoder
The order registrations are made counts, the encoding process is done in the same order until a compatible encoder is found.
- Parameters:
encoder – Function encoding a data into a serializable data.
decoder – Function decoding a serialized data into a usable data.
- register_object_hook(encoder, decoder)[source]#
Register an encoder and a decoder that can convert a python object into data which can be serialized by msgpack.
- Parameters:
encoder – Function encoding a data into a data serializable by msgpack
decoder – Function decoding a python structure provided by msgpack
data. (into an usable)