Output valid JSON for multi-domain CLI commands

TODO: Refactor concrete command implementations return an Object that can
then be put into a {"$DOMAIN": $VALUE} dict before json serializing and
returning it.