Output JSON for `--json` switch in CLI tool

for create, deploy, and undeploy subcommands.