<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, depth=-1, **kwargs):
 """Returns a JSON representation of the object."""

        return json.dumps(self.to_dict(depth=depth, ordered=True), **kwargs)