Open harriettxing opened 5 years ago
Yes, but not with the provided driver program. The Java API accepts a java.io.Writer object to handle the output, which can be directed to stdout. The sample driver program, for which the Java source is provided, creates a FileWriter using a filename from the command line. But you could modify the driver program to write to stdout instead. This sounds like it might be a useful feature in a new version; it would allow the content to be piped between Linux tasks without going into a file. Is that what you had in mind?
Yes. I am using the tool in php. When it writes to a file, I delete the file after loading the json into a php variable. $out = shell_exec('java -jar edireader-json-basic-5.5.14.jar '.$filename.' '.$outfilename); $string = file_get_contents($outfilename); $json_a = json_decode($string, true); exec("rm ".$outfilename);
If the output can be directed to stdout, I could avoid using the file. $out = shell_exec('java -jar edireader-json-basic-5.5.14.jar '.$filename.' '.$outfilename); $json_a = json_decode($out, true);
I am creating a new release with a change to the command line driver to allow output to be written to stdout, and also for input to be read from stdin. It should be ready in a few days.
Can the the output be directed to stdout instead written to an output file?