code: def to_json(self, *, include_keys=None, exclude_keys=None, use_default_excludes=True,
                pretty=False):
      
      return to_json(
        self.to_dict(
          include_keys=include_keys,
          exclude_keys=exclude_keys,
          use_default_excludes=use_default_excludes),
        pretty=pretty)
docs: Converts the response from to_dict to a JSON string. If pretty is True then newlines,
      indentation and key sorting are used.