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");
err.println(" converts Avro data file to JSON.");
optionParser.printHelpOn(err);
return 1;
}
GenericDatumReader<Object> reader = new GenericDatumReader<Object>();
FileReader<Object> fileReader =