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)
def json_encode ( obj : Instance , ** kwargs ) -> str : return json . dumps ( obj , cls = JsonClassEncoder , ** kwargs )
Encodes an object to JSON using our custom encoder.

    The ``**kwargs`` can be used to pass things like ``'indent'``, for
    formatting.