OptionSpec<Void> prettyOption = optionParser
.accepts("pretty", "Turns on pretty printing.");
OptionSet optionSet = optionParser.parse(args.toArray(new String[0]));
Boolean pretty = optionSet.has(prettyOption);
List<String> nargs = optionSet.nonOptionArguments();
if (nargs.size() != 1) {
// Unlike other commands, "-" can't be used for stdin, because
// we can only use seekable files.
err.println("tojson --pretty input-file");