Add an option to output the result of commands to a JSON file. Currently suggested option name is`--to-json file.json`.