docs: def to_json(self):
          """
          Returns a json-compatible object from the objective that can be saved using the json module.
  
          Example
          --------
          >>> import json
          >>> with open("path_to_file.json", "w") as outfile:
          >>>     json.dump(obj.to_json(), outfile)
          """
          json_obj = {
              "name": self.name,
              "expression": expr_to_json(self.expression),
              "direction": self.direction
          }
          return json_obj