def translate_service_orm_to_json(orm):
    """Translate ORM to JSON for response payload."""
    ret = {"service_id": orm.service_id, "schema": orm.schema, "config": {}}
    for config in orm.configs:
        if config.hostname not in ret["config"]:
            ret["config"][config.hostname] = {}
        ret["config"][config.hostname][config.schema] = config.config

    return ret