docs: def from_json(cls, json_obj, variables=None):
          """
          Constructs an Objective from the provided json-object.
  
          Example
          --------
          >>> import json
          >>> with open("path_to_file.json") as infile:
          >>>     obj = Objective.from_json(json.load(infile))
          """
          if variables is None:
              variables = {}
          expression = parse_expr(json_obj["expression"], variables)
          return cls(
              expression,
              direction=json_obj["direction"],
              name=json_obj["name"]
          )