(dist: BaseDistribution)
return json.dumps({"name": dist.__class__.__name__, "attributes": dist._asdict()})
Serialize a distribution to JSON format.

    Args:
        dist: A distribution to be serialized.

    Returns:
        A JSON string of a given distribution.
Serialize a distribution to JSON format.
Serialize a distribution to JSON format .
def distribution_to_json(dist: BaseDistribution) -> str:
    """Serialize a distribution to JSON format.

    Args:
        dist: A distribution to be serialized.

    Returns:
        A JSON string of a given distribution.

    """

    return json.dumps({"name": dist.__class__.__name__, "attributes": dist._asdict()})
def distribution_to_json ( dist : BaseDistribution ) -> str : return json . dumps ( { "name" : dist . __class__ . __name__ , "attributes" : dist . _asdict ( ) } )