[READY] Machine print ports

This PR adds an option to the ports command `--json` that will output the ports in a json string that can be consumed by another app.