def dumps(self, data):
    data = json.dumps(data, ensure_ascii=False, default=self.default)
    return data.encode('utf-8')
def dumps(self, data):
    data = json.dumps(data, ensure_ascii=False, default=self.default)
    return data.encode('utf-8')