Output valid JSON for multi-domain CLI commands

Yea I would've liked that, but if you use `--master <endpoint>`, there won't be a domain. Just a single endpoint.