JSON Converter
Convert an EDIFACT or X12 message into JSON, or back the other way, without losing the original semantics. The tool guarantees a bytewise round-trip (modulo inter-segment whitespace) on the project's standard fixtures.
Tool
How it works
- EDI → JSON: reads the envelope (
UNBorISA), resolves separators (UNA for EDIFACT, fixed-position for X12), and projects each segment into a structural JSON object. - JSON → EDI: generates the envelope, service
segments and qualifiers.
UNT/UNZcounters (EDIFACT) andSE/GE/IEAcounters (X12) are recomputed automatically from the segment list. - Round-trip guarantee: convert to JSON then back to EDI and the output matches the source byte-for-byte (modulo inter-segment whitespace, which ISO 9735 tolerates).
- Custom separators preserved: the tool re-applies
release-character escaping (
?by default in EDIFACT) correctly on the reverse direction.
JSON projection
The target JSON schema is structural, not business-oriented: it exposes the envelope, message headers, and the complete list of segments in source order. Each composite element is an array of string components, which makes the reverse transformation mechanical.
For the business-oriented projection (named fields like
purchaseOrder, parties, lines,
…) see the JSON equivalent section of the
ORDERS D.96A
page: it is documentary in V1, executable in a later iteration.
Privacy
Related documentation
- ORDERS D.96A — the business-oriented JSON projection documented per interchange, message and lines.
- EDIFACT — the anatomy of the standard the converter consumes.
- EDIFACT Validator — the underlying parser is shared between both tools.