Git Product home page Git Product logo

Comments (3)

canabrook avatar canabrook commented on June 12, 2024 1

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.

from edi-json.

canabrook avatar canabrook commented on June 12, 2024

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?

from edi-json.

harriettxing avatar harriettxing commented on June 12, 2024

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);

from edi-json.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.