Compiled to native code with zero-copy UTF-8 buffers and streaming split/merge for high-throughput EDI processing.
A single self-contained shared library per platform. Copy that one file to the target machine and call it.
Translate between EDI data and structured JSON: a whole X12 interchange to JSON in one call with parse, and back again with build.
Process one transaction set or segment at a time with flat, low memory use - ideal for very large interchange files.
Validate transaction sets with configurable SNIP levels, regex, date/time formats, and error limits, for a detailed report.
Automatically generate 999, 997, and TA1 acknowledgments from validated interchanges in a single operation mode.
import json import edifabric_x12 as ef serial = "YOUR_SERIAL_KEY" ef.load_library() ef.set_serial(serial) ef.set_map(json.dumps({"default": serial, "maps": {}})) edi = open("837P_Claim.txt", "rb").read() output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE) transactions = output[:offset] report = json.loads(output[offset:]) print(report["errors_count"])
using EdiFabric.Native.X12; const string serial = "YOUR_SERIAL_KEY"; EdiFabricX12.Load(); EdiFabricX12.SetSerial(serial); EdiFabricX12.SetMap($$"""{"default": "{{serial}}", "maps": {}}"""); var edi = File.ReadAllBytes("837P_Claim.txt"); var result = EdiFabricX12.Parse(edi, ParseMode.JsonValidate); Console.WriteLine(result.Transactions); Console.WriteLine(result.Report);
import com.edifabric.nativex12.EdiFabricX12; import com.edifabric.nativex12.ParseMode; import com.edifabric.nativex12.ParseResult; String serial = "YOUR_SERIAL_KEY"; EdiFabricX12.loadLibrary(); EdiFabricX12.setSerial(serial); EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}"); String edi = Files.readString(Path.of("837P_Claim.txt")); ParseResult result = EdiFabricX12.parse(edi, ParseMode.JSON_VALIDATE); System.out.println(result.getTransactions()); System.out.println(result.getReport());
const fs = require("fs"); const ef = require("edifabric-x12"); const serial = "YOUR_SERIAL_KEY"; ef.loadLibrary(); ef.setSerial(serial); ef.setMap(JSON.stringify({ default: serial, maps: {} })); const edi = fs.readFileSync("837P_Claim.txt"); const { output, offset } = ef.parse(edi, ef.ParseMode.JSON_VALIDATE); const transactions = output.slice(0, offset); const report = JSON.parse(output.slice(offset)); console.log(report.errors_count);
import ef "github.com/EdiFabric/edifabric-go-bindings" import _ "github.com/EdiFabric/edifabric-go-bindings/native" serial := "YOUR_SERIAL_KEY" ef.LoadLibrary("") ef.SetSerial(serial) ef.SetMap([]byte(`{"default": "` + serial + `", "maps": {}}`)) edi, _ := os.ReadFile("837P_Claim.txt") output, offset, err := ef.Parse(edi, ef.ParseJSONValidate, nil) if err != nil { log.Fatal(err) } fmt.Println(string(output[:offset])) fmt.Println(string(output[offset:]))
use edifabric_x12 as ef; let serial = "YOUR_SERIAL_KEY"; ef::load_library(None)?; ef::set_serial(serial)?; ef::set_map(&format!(r#"{{"default": "{serial}", "maps": {{}}}}"#))?; let edi = std::fs::read("837P_Claim.txt")?; let (output, offset) = ef::parse(&edi, ef::ParseMode::JsonValidate, None)?; let transactions = &output[..offset]; let report = &output[offset..]; println!("{transactions}"); println!("{report}");
#include "edifabric_x12.h" const char *serial = "YOUR_SERIAL_KEY"; ef_parse_result result; if (ef_load_library(NULL) != 0) return 1; ef_set_serial(serial); ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}"); char *edi = read_file("837P_Claim.txt", NULL); /* helper in example_all_functions.c */ if (ef_parse(edi, EF_PARSE_JSON_VALIDATE, NULL, &result) == 0) { /* transactions = output[0 .. offset), report = output[offset .. length) */ fwrite(result.output.data, 1, (size_t)result.output.length, stdout); ef_free(result.output.data); }
A ctypes wrapper for Python that handles the grow-and-retry buffer for you.
PyPI: pip install edifabric-x12
JNA bindings for Java that map the native entry points to plain Java methods.
Maven Central: com.edifabric:edifabric-x12-native
koffi bindings for Node.js 18 and later, with TypeScript types, from CommonJS or ES modules.
npm: npm install edifabric-x12
purego bindings for Go, so there is no cgo and no C compiler, with iterators for split and merge.
Go modules: go get github.com/EdiFabric/edifabric-go-bindings
A safe Rust crate over libloading that takes strings or byte slices and returns Result.
crates.io: cargo add edifabric-x12
P/Invoke bindings that call the native library from C# and other .NET languages.
NuGet: dotnet add package EdiFabric.Native.X12
The reference header and examples that define the ABI every other binding wraps.
Download the library and include edifabric_x12.h
The packages bundle the library for Windows x64, Linux x64 and arm64, and macOS arm64, so one install command is all you need. Working in C++, PHP, Ruby, Swift, Kotlin or something else? Every binding calls the same handful of C entry points, so the C bindings document contains everything you need. Tell us which language you are on and we will help you wire it up.
Community costs nothing and never expires, giving you unlimited operations for the first 14 days, then 250 a day, and three leased seats for non-production work. Need more time? Ask support to extend the unlimited period. Developer and Enterprise lift the quota, Enterprise lifts the seat count, and all three include the same library.
Native is the newest of the three and covers X12 and HIPAA, with the remaining standards being released one at a time. If you need EDIFACT, HL7, NCPDP or flat files right now, use ediFabric .NET or ediFabric Cloud — your plan already includes them.
Every operation runs inside your own process, on your own hardware. EDI data and PHI stay on your systems, so Native sits entirely within the controls you already have in place for HIPAA or SOC 2.
bd96a836feca45cb91c86ee65d281f52.