code: def setEncoder(self, encoder):
          
          if not encoder:
              self._encoder = json.JSONEncoder()
          else:
              self._encoder = encoder
          self._encode = self._encoder.encode
docs: Sets the client's encoder
          ``encoder`` should be an instance of a ``json.JSONEncoder`` class