With EdiNation, you can convert between EDI and JSON bi-directionally. Both editors allow you to modify the content. All conversion between EDI and JSON is based on Web Assembly and runs locally in your browser. Your sensitive data remains on your machine and never leaves the browser.
Parse EDI
To begin, navigate to EdiNation EDI JSON page. Then, either paste (in the text editor under the button bar) or upload an EDI file by clicking the plus button:
If you are pasting a file instead of uploading it, you must parse it first, by clicking the Parse button. Uploaded files are automatically parsed. Note that you must parse the contents of your EDI file every time after you modify it to ensure the JSON conversion reflects all changes.
Only files which have been parsed without errors can be converted to JSON.
You can also load one of the pre-configured examples (by clicking the arrow-down button to select an example) to begin with:
Parse EDI with an explicit or custom EDI model
Each EDI message will be matched automatically to a model. If you want to use a custom EDI model, you need to configure it:
Clear the custom model when you have to revert to the automatic model resolution.
Convert EDI to JSON
To convert an EDI file to JSON, hit the JSON button. The converted EDI file is displayed in the JSON editor on the right:
You can edit the EDI data and convert it to JSON as many times as needed.
Convert EDI to JSON with splitting
When you convert very large EDI files to JSON, the JSON output can grow x10 and your browser might slow down significantly or even crash. EdiNation allows you to convert EDI to JSON in chunks, in the following situations:
- The EDI file contains a batch of transactions, or ST/SE blocks. In this case you can split by transaction.
- The EDI file contains a repeating loop with multiple instances. In this case you can split by loop.
To enable splitting all you need to do is to set the index of the segment, which is:
- To split by transaction, that would be the index of the first ST segment
- To split by loop, that would be the index of the first segment in the repeating loop. For example in a repeating loop Loop2400, the first segment is LX, and the index of LX in the editor is 32.
In both cases, the index of the segment is the index displayed in the EDI editor.
The index of the segment to split by must go in the box to the right of the To JSON button. Note that if the index does not match a repeating loop, or ST, splitting will not take effect.
Convert JSON to EDI
You can generate EDI files by modifying the contents in the JSON editor on the right. The JSON must be one of the supported X12, EDIFACT, HL7, NCPDP, or VDA root resources. The JSON for all EDI transactions must match an existing Transaction Model. When you are ready to generate your EDI file, hit the From JSON button:
To ensure the generated EDI file is correct, click on the Parse button.
Convert JSON to EDI with custom delimiters
- If you need to generate an X12 with non-default separators, set the following items as part of the X12Interchange payload:
- Segment separator:
X12Interchange.SegmentDelimiter - Data element separator:
X12Interchange.DataElementDelimiter - Repetition separator:
X12Interchange.ISA.InterchangeControlStandardsIdentifier_11 - Component data element separator:
X12Interchange.ISA.ComponentElementSeparator_16
- Segment separator:
Next steps
To learn more about how to translate and validate EDI files with EdiNation, try these tutorials:
Comments
0 comments
Please sign in to leave a comment.