minos.common.protocol.json module

class minos.common.protocol.json.MinosJsonBinaryProtocol[source]

Bases: minos.common.protocol.abc.MinosBinaryProtocol

JSON based binary encoder / decoder implementation.

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

Decodes the given bytes data.

Parameters

data (bytes) – bytes data to be decoded.

Return type

typing.Any

Returns

De decoded data.

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

Encodes the given value into bytes.

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

  • args – Additional positional arguments.

  • kwargs – Additional named arguments.

Return type

bytes

Returns

A bytes instance.