Make output format selectable with command-line switch.
return 1 from main if parse failed.
return 1 from main if parse failed.
Add -h and --help to show the --json option