<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_json(self):
 """ Returns a json-compatible object from the model that can be saved using the json module. Variables, constraints and objective contained in the model will be saved. Configurations will not be saved. Example -------- """

        json_obj = {
            "name": self.name,
            "variables": [var.to_json() for var in self.variables],
            "constraints": [const.to_json() for const in self.constraints],
            "objective": self.objective.to_json()
        }
        return json_obj