Bulk Conversion API

The bulk conversion API allows you to convert EDI files in bulk to JSON, CSV, or Excel with minimal custom code.

The API provides the same functionality as the CLI tool, but directly from your Java application:

public void convertMultipleFilesToJsonLines() {
    var converter = new EdiFileConverter(OutputFormat.JSONL);
    // Convert each file into a corresponding JSON file. If the output file is an existing directory, each file will be converted individually
    converter.convertFiles(new File(EDI_FILES_DIR + "/837"), "*.dat", false, OUT_DIR);
    // Convert all files into a single JSON file. The output file must not be an existing directory
    var outFile = new File(OUT_DIR, "all-837");
    converter.convertFiles(new File(EDI_FILES_DIR + "/837"), "*.dat", false, outFile);
}

View the complete example in GitHub.