code: def json_dumps(self, data):
          return json.dumps(
              data, 
              separators=(',', ':'), 
              sort_keys=True, 
              cls=self.json_encoder, 
              ensure_ascii=False
          ).encode('utf8')