def encode_json()

in src/sagemaker_huggingface_inference_toolkit/decoder_encoder.py [0:0]


def encode_json(content, accept_type=None):
    """
    encodes json with custom `JSONEncoder`
    """
    return json.dumps(
        content,
        ensure_ascii=False,
        allow_nan=False,
        indent=None,
        cls=_JSONEncoder,
        separators=(",", ":"),
    )