<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def json_encode(obj: Instance, **kwargs) -> str: """ Encodes an object to JSON using our custom encoder. The ``**kwargs`` can be used to pass things like ``'indent'``, for formatting. """

    return json.dumps(obj, cls=JsonClassEncoder, **kwargs)