<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 Variable that can be saved using the json module. Example -------- """

        json_obj = {
            "name": self.name,
            "lb": self.lb,
            "ub": self.ub,
            "type": self.type
        }
        return json_obj