def _list(json_):

    client = marathon.create_client()
    apps = client.get_apps()

    if json_:
        emitter.publish(apps)
    else:
        deployments = client.get_deployments()
        table = tables.app_table(apps, deployments)
        output = str(table)
        if output:
            emitter.publish(output)

    return 0
:param json_: output json if True
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py/_list