minos.common.protocol.json

Classes

MinosJsonBinaryProtocol

JSON based binary encoder / decoder implementation.

class MinosJsonBinaryProtocol[source]

Bases: MinosBinaryProtocol

JSON based binary encoder / decoder implementation.

classmethod encode(data, *args, **kwargs)[source]

Encodes the given value into bytes.

Parameters
  • data (Any) – Data to be encoded.

  • args – Additional positional arguments.

  • kwargs – Additional named arguments.

Returns

A bytes instance.

Return type

bytes

classmethod decode(data, *args, **kwargs)[source]

Decodes the given bytes data.

Parameters

data (bytes) – bytes data to be decoded.

Returns

De decoded data.

Return type

Any