|
In order to serialize a given parameters object, it is enough to call its serialize
function. It is also possible to use the serialize
function that is declared directly in the yami
module, which can accept Parameters
as well any built-in dictionary objects.
The object will be serialized into a single binary buffer.
buffer = params.serialize() # or: buffer = yami.serialize(params)
Deserialization is symmetric - if the buffer is already filled with data, the parameters object can be reconstructed with a single call:
params.deserialize(buffers);