Closes #8557
Adds these test cases: 383 - simple single command line option 384 - reading it from stdin 385 - getting two --json options on command line 386 - --next works after --json Closes #8314