code: def _convert(self, payload):
          
          if not isinstance(payload, six.string_types):
              payload = json.dumps(payload, cls=DefaultJSONEncoder, sort_keys=True)
          return str(payload)
docs: Converts payload to a string. Complex objects are dumped to json