示例#1
0
 def dumps(self, msg):
     '''
     Run the correct dumps serialization format
     '''
     if self.serial == 'pickle':
         return pickle.dumps(msg)
     else:
         return msgpack.dumps(msg)
示例#2
0
 def dumps(self, msg):
     '''
     Run the correct dumps serialization format
     '''
     if self.serial == 'pickle':
         return pickle.dumps(msg)
     else:
         return msgpack.dumps(msg)
示例#3
0
def package(payload):
    '''
    This method for now just wraps msgpack.dumps, but it is here so that we can
    make the serialization a custom option in the future with ease.
    '''
    return msgpack.dumps(payload)
示例#4
0
def package(payload):
    '''
    This method for now just wraps msgpack.dumps, but it is here so that we can
    make the serialization a custom option in the future with ease.
    '''
    return msgpack.dumps(payload)