def dumps(self, value): # Dump object value = pickle.dumps(value, protocol=self.protocol) # Build unicode string from `value` value = six.text_type(value, 'latin-1') # Return UTF-8 string return value.encode('utf-8')
def dumps(self, value): if msgpack is None: raise Exception('"msgpack" library is not available') # Dump object value = msgpack.dumps(value) value = six.text_type(value, 'raw_unicode_escape') # Return UTF-8 string return value.encode('utf-8')
def dumps(self, value): if msgpack is None: raise Exception('"msgpack" library is not available') # Dump object value = msgpack.dumps(value) value = six.text_type(value, "raw_unicode_escape") # Return UTF-8 string return value.encode("utf-8")