xia_easy_proto.proto.EasyProto

class xia_easy_proto.proto.EasyProto

Bases: object

__init__()

Methods

__init__()

serialize(raw_data[, label, sample_data, ...])

Serialize Data from json format to

Attributes

MESSAGE

library

type_dict

classmethod serialize(raw_data: Union[list, dict], label: str = '', sample_data: Optional[dict] = None, message_class=None)

Serialize Data from json format to

Parameters
  • label (str) – Label of compiled object in order to reuse it. Leave it empty if data structure is dynamic

  • raw_data (list or dict) – Python object

  • sample_data (dict) – A dictionary who has all fields, will parse raw_data if not provided

  • message_class – A given message class to be used

Returns

Message class list of bytes: List of serialized object

Return type

message class