def _to_dict()

in cstar/jobwriter.py [0:0]


def _to_dict(child):
    if type(child) is set:
        return list(child)
    if type(child) is cstar.topology.Topology:
        return list(child)
    if type(child) is cstar.strategy.Strategy:
        return cstar.strategy.serialize(child)
    if type(child) is cstar.state.State:
        return _state_to_dict(child)
    if type(child) is cstar.progress.Progress:
        return _progress_to_dict(child)
    if type(child) is cstar.job.Job:
        return _job_to_dict(child)
    return child