code: def json_dumps(self, data):
          
          return json.dumps(
              data, 
              separators=(',', ':'), 
              sort_keys=True, 
              cls=self.json_encoder, 
              ensure_ascii=False
          ).encode('utf8')
docs: Standardized json.dumps function with separators and sorted keys set
  
          Args:
              data (dict or list): data to be dumped
  
          Returns:
              string: json