def Encoder(self, data, **_): data = self.renderer.encoder.Encode(data) try: return pickle.dumps(data, -1) except TypeError: raise io_manager.EncodeError("Unable to pickle data")
def Encoder(self, data, **_): encoder = json_renderer.JsonEncoder(session=self.session, renderer="JsonRenderer") data = encoder.Encode(data) try: return cPickle.dumps(data, -1) except TypeError: raise io_manager.EncodeError("Unable to pickle data")